public class CaseInsensitiveHashMap<K,V> extends Object implements Map<K,V>, Serializable
Map.
As entries are added to the map, keys hash values are lowercase hash codes of the key. the Real key case is preserved.
The 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.| Constructor and Description |
|---|
CaseInsensitiveHashMap()
Constructs a new empty map with default size and load factor.
|
CaseInsensitiveHashMap(Map map)
Constructor copying elements from another map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Object |
clone()
Clones the map without cloning the keys or values.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> values) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic CaseInsensitiveHashMap()
public CaseInsensitiveHashMap(Map map)
map - the map to copyNullPointerException - if the map is nullpublic Object clone()
public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.