|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,V>
com.massimo.utils.CaseInsensitiveHashMap<V>
V
- public class CaseInsensitiveHashMap<V>
A HashMap that always does key.toString().toLowercase()
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
CaseInsensitiveHashMap()
Constructs an empty CaseInsensitiveHashMap with the default initial capacity (16) and the default load factor (0.75). |
|
CaseInsensitiveHashMap(int initialCapacity)
Constructs an empty CaseInsensitiveHashMap with the specified initial capacity and the default load factor (0.75). |
|
CaseInsensitiveHashMap(int initialCapacity,
float loadFactor)
Constructs an empty CaseInsensitiveHashMap with the specified initial capacity and load factor. |
|
CaseInsensitiveHashMap(Map<? extends String,? extends V> m)
Constructs a new CaseInsensitiveHashMap with the same mappings as the specified Map. |
Method Summary | |
---|---|
boolean |
containsKey(Object key)
Override HashMap |
V |
get(Object key)
Override HashMap |
V |
put(String key,
V value)
Override HashMap |
V |
remove(Object key)
Override HashMap |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsValue, entrySet, isEmpty, keySet, putAll, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public CaseInsensitiveHashMap()
public CaseInsensitiveHashMap(int initialCapacity)
initialCapacity
- the initial capacity.
IllegalArgumentException
- if the initial capacity is negative.public CaseInsensitiveHashMap(int initialCapacity, float loadFactor)
initialCapacity
- The initial capacity.loadFactor
- The load factor.
IllegalArgumentException
- if the initial capacity is negative or
the load factor is nonpositive.public CaseInsensitiveHashMap(Map<? extends String,? extends V> m)
m
- the map whose mappings are to be placed in this map.
NullPointerException
- if the specified map is null.Method Detail |
---|
public boolean containsKey(Object key)
containsKey
in interface Map<String,V>
containsKey
in class HashMap<String,V>
key
- key whose presence in this map is to be tested.
public V get(Object key)
get
in interface Map<String,V>
get
in class HashMap<String,V>
key
- key whose associated value is to be returned.
public V put(String key, V value)
put
in interface Map<String,V>
put
in class HashMap<String,V>
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.
public V remove(Object key)
remove
in interface Map<String,V>
remove
in class HashMap<String,V>
key
- key whose associated value is to be returned.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |