org.apache.tapestry5.ioc.util
Class CaseInsensitiveMap<V>
java.lang.Object
java.util.AbstractMap<String,V>
org.apache.tapestry5.ioc.util.CaseInsensitiveMap<V>
- Type Parameters:
V - the type of value stored
- All Implemented Interfaces:
- Serializable, Map<String,V>
public class CaseInsensitiveMap<V>
- extends AbstractMap<String,V>
- implements 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
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
CaseInsensitiveMap
public CaseInsensitiveMap()
CaseInsensitiveMap
public CaseInsensitiveMap(int size)
CaseInsensitiveMap
public CaseInsensitiveMap(Map<String,? extends V> map)
clear
public void clear()
- Specified by:
clear in interface Map<String,V>- Overrides:
clear in class AbstractMap<String,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Map<String,V>- Overrides:
isEmpty in class AbstractMap<String,V>
size
public int size()
- Specified by:
size in interface Map<String,V>- Overrides:
size in class AbstractMap<String,V>
put
public V put(String key,
V value)
- Specified by:
put in interface Map<String,V>- Overrides:
put in class AbstractMap<String,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface Map<String,V>- Overrides:
containsKey in class AbstractMap<String,V>
get
public V get(Object key)
- Specified by:
get in interface Map<String,V>- Overrides:
get in class AbstractMap<String,V>
remove
public V remove(Object key)
- Specified by:
remove in interface Map<String,V>- Overrides:
remove in class AbstractMap<String,V>
entrySet
public Set<Map.Entry<String,V>> entrySet()
- Specified by:
entrySet in interface Map<String,V>- Specified by:
entrySet in class AbstractMap<String,V>
Copyright © 2003-2012 The Apache Software Foundation.