Class CaseInsensitiveKeyMap<V>
- java.lang.Object
-
- java.util.AbstractMap<String,V>
-
- org.apache.tomcat.util.collections.CaseInsensitiveKeyMap<V>
-
- Type Parameters:
V- Type of values placed in this Map.
public class CaseInsensitiveKeyMap<V> extends AbstractMap<String,V>
A Map implementation that uses case-insensitive (usingLocale.ENGLISH) strings as keys.Keys must be instances of
String. Note that this means thatnullkeys are not permitted.This implementation is not thread-safe.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveKeyMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object key)Set<Map.Entry<String,V>>entrySet()Vget(Object key)Vput(String key, V value)voidputAll(Map<? extends String,? extends V> m)Vremove(Object key)-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
putAll
public void putAll(Map<? extends String,? extends V> m)
Use this method with caution. If the input Map contains duplicate keys when the keys are compared in a case insensitive manner then some values will be lost when inserting via this method.
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,V>- Overrides:
containsKeyin classAbstractMap<String,V>
-
-