|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
org.apache.commons.collections.map.AbstractHashedMap
org.mule.util.CaseInsensitiveHashMap
public class CaseInsensitiveHashMap
A case-insensitive Map
.
keySet()
method returns all keys in their original case
Note that CaseInsensitiveMap is not synchronized and is not thread-safe.
If you wish to use this map from multiple threads concurrently, you must use
appropriate synchronization. The simplest approach is to wrap this map
using Collections.synchronizedMap(Map)
. This class may throw
exceptions when accessed by concurrent threads without synchronization.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractHashedMap |
---|
AbstractHashedMap.EntrySet, AbstractHashedMap.EntrySetIterator, AbstractHashedMap.HashEntry, AbstractHashedMap.HashIterator, AbstractHashedMap.HashMapIterator, AbstractHashedMap.KeySet, AbstractHashedMap.KeySetIterator, AbstractHashedMap.Values, AbstractHashedMap.ValuesIterator |
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class org.apache.commons.collections.map.AbstractHashedMap |
---|
data, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_THRESHOLD, entrySet, GETKEY_INVALID, GETVALUE_INVALID, keySet, loadFactor, MAXIMUM_CAPACITY, modCount, NO_NEXT_ENTRY, NO_PREVIOUS_ENTRY, NULL, REMOVE_INVALID, SETVALUE_INVALID, size, threshold, values |
Constructor Summary | |
---|---|
CaseInsensitiveHashMap()
Constructs a new empty map with default size and load factor. |
|
CaseInsensitiveHashMap(int initialCapacity)
Constructs a new, empty map with the specified initial capacity. |
|
CaseInsensitiveHashMap(int initialCapacity,
float loadFactor)
Constructs a new, empty map with the specified initial capacity and load factor. |
|
CaseInsensitiveHashMap(Map map)
Constructor copying elements from another map. |
Method Summary | |
---|---|
Object |
clone()
Clones the map without cloning the keys or values. |
protected int |
hash(Object key)
Creates a hash value from the lower case value of the key. |
protected boolean |
isEqualKey(Object key1,
Object key2)
Overloads the default behaviour to compare the keys without case sensitivity |
Methods inherited from class org.apache.commons.collections.map.AbstractHashedMap |
---|
addEntry, addMapping, calculateNewCapacity, calculateThreshold, checkCapacity, clear, containsKey, containsValue, convertKey, createEntry, createEntrySetIterator, createKeySetIterator, createValuesIterator, destroyEntry, doReadObject, doWriteObject, ensureCapacity, entryHashCode, entryKey, entryNext, entrySet, entryValue, equals, get, getEntry, hashCode, hashIndex, init, isEmpty, isEqualValue, keySet, mapIterator, put, putAll, remove, removeEntry, removeMapping, reuseEntry, size, toString, updateEntry, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CaseInsensitiveHashMap()
public CaseInsensitiveHashMap(int initialCapacity) throws IllegalArgumentException
initialCapacity
- the initial capacity
IllegalArgumentException
- if the initial capacity is less than onepublic CaseInsensitiveHashMap(int initialCapacity, float loadFactor) throws IllegalArgumentException
initialCapacity
- the initial capacityloadFactor
- the load factor
IllegalArgumentException
- if the initial capacity is less than one
IllegalArgumentException
- if the load factor is less than zeropublic CaseInsensitiveHashMap(Map map)
map
- the map to copy
NullPointerException
- if the map is nullMethod Detail |
---|
protected int hash(Object key)
hash
in class AbstractHashedMap
key
- the key value to hash
protected boolean isEqualKey(Object key1, Object key2)
isEqualKey
in class AbstractHashedMap
key1
- the first keykey2
- the key to compare against
public Object clone()
clone
in class AbstractHashedMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |