Class CaseInsensitiveMap<V>
- java.lang.Object
-
- java.util.AbstractMap<java.lang.String,V>
-
- org.apache.tapestry5.commons.util.CaseInsensitiveMap<V>
-
- Type Parameters:
V
- the type of value stored
- All Implemented Interfaces:
java.io.Serializable
,java.util.Map<java.lang.String,V>
public class CaseInsensitiveMap<V> extends java.util.AbstractMap<java.lang.String,V> implements java.io.Serializable
An mapped collection where the keys are always strings and access to values is case-insensitive. The case of keys in the map is maintained, but on any access to a key (directly or indirectly), all key comparisons are performed in a case-insensitive manner. The map implementation is intended to support a reasonably finite number (dozens or hundreds, not thousands or millions of key/value pairs. Unlike HashMap, it is based on a sorted list of entries rather than hash bucket. It is also geared towards a largely static map, one that is created and then used without modification.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveMap()
CaseInsensitiveMap(int size)
CaseInsensitiveMap(java.util.Map<java.lang.String,? extends V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
java.util.Set<java.util.Map.Entry<java.lang.String,V>>
entrySet()
V
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set<java.lang.String>
keySet()
V
put(java.lang.String key, V value)
V
remove(java.lang.Object key)
int
size()
-
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, putAll, toString, values
-
-
-
-
Constructor Detail
-
CaseInsensitiveMap
public CaseInsensitiveMap()
-
CaseInsensitiveMap
public CaseInsensitiveMap(int size)
-
CaseInsensitiveMap
public CaseInsensitiveMap(java.util.Map<java.lang.String,? extends V> map)
-
-
Method Detail
-
clear
public void clear()
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
-