Class CaseInsensitiveKeyMap<V>
- java.lang.Object
-
- java.util.AbstractMap<java.lang.String,V>
-
- org.apache.tomcat.util.collections.CaseInsensitiveKeyMap<V>
-
- Type Parameters:
V- Type of values placed in this Map.
- All Implemented Interfaces:
java.util.Map<java.lang.String,V>
public class CaseInsensitiveKeyMap<V> extends java.util.AbstractMap<java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveKeyMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(java.lang.Object key)java.util.Set<java.util.Map.Entry<java.lang.String,V>>entrySet()Vget(java.lang.Object key)Vput(java.lang.String key, V value)voidputAll(java.util.Map<? extends java.lang.String,? extends V> m)Vremove(java.lang.Object key)-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
-
-
-
-
Method Detail
-
get
public V get(java.lang.Object key)
-
putAll
public void putAll(java.util.Map<? extends java.lang.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(java.lang.Object key)
-
remove
public V remove(java.lang.Object key)
-
-