public class CaseInsensitiveKeyMap<V>
extends java.lang.Object
implements java.util.Map<java.lang.String,V>, java.io.Serializable
Constructor and Description |
---|
CaseInsensitiveKeyMap()
Initialize the new instance with default values.
|
CaseInsensitiveKeyMap(int initialCapacity)
Initialize the new instance with an initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key)
This method returns true, if the given key can be found in this map.
|
boolean |
containsValue(java.lang.Object value)
This method returns true, if the given value is a value of any entry
in this map.
|
protected java.util.Map<java.lang.String,NamedValue<V>> |
createInternalMap(int capacity) |
java.util.Set<java.util.Map.Entry<java.lang.String,V>> |
entrySet()
This method automatically touches every entry, so that its
expire period starts anew.
|
protected java.util.Map.Entry<java.lang.String,NamedValue<V>> |
findByValue(java.lang.Object value) |
V |
get(java.lang.Object key)
Returns the object that was registered under the specified key.
|
protected java.util.Map<java.lang.String,NamedValue<V>> |
internalMap() |
protected void |
internalMap(java.util.Map<java.lang.String,NamedValue<V>> newValue) |
boolean |
isEmpty() |
java.util.Set<java.lang.String> |
keySet() |
V |
put(java.lang.String key,
V value)
Puts the given value under the specified key into the map.
|
void |
putAll(java.util.Map<? extends java.lang.String,? extends V> map)
Each entry of the given map will be added.
|
V |
remove(java.lang.Object key)
Removes the entry with the specified key.
|
int |
size() |
protected java.lang.String |
standardizeKey(java.lang.Object key) |
java.util.Collection<V> |
values()
Returns all values of the map.
|
public CaseInsensitiveKeyMap()
public CaseInsensitiveKeyMap(int initialCapacity)
initialCapacity
- Defines how many "slots" for elements are created initiallypublic boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,V>
public int size()
size
in interface java.util.Map<java.lang.String,V>
public void clear()
clear
in interface java.util.Map<java.lang.String,V>
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,V>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,V>
Map.containsKey(Object)
public V get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,V>
Map.get(Object)
public V put(java.lang.String key, V value)
put
in interface java.util.Map<java.lang.String,V>
Map.put(Object, Object)
public void putAll(java.util.Map<? extends java.lang.String,? extends V> map)
putAll
in interface java.util.Map<java.lang.String,V>
Map.putAll(Map)
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,V>
Map.containsValue(Object)
public java.util.Collection<V> values()
values
in interface java.util.Map<java.lang.String,V>
Map.values()
public V remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.String,V>
Map.remove(Object)
public java.util.Set<java.util.Map.Entry<java.lang.String,V>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,V>
Map.entrySet()
protected java.lang.String standardizeKey(java.lang.Object key)
protected java.util.Map.Entry<java.lang.String,NamedValue<V>> findByValue(java.lang.Object value)
protected java.util.Map<java.lang.String,NamedValue<V>> createInternalMap(int capacity)
protected java.util.Map<java.lang.String,NamedValue<V>> internalMap()
protected void internalMap(java.util.Map<java.lang.String,NamedValue<V>> newValue)