public class CaseInsensitiveHashMap extends LinkedHashMap<String,Object>
The keys are stored as they are given [BUG #DBUTILS-34], so we maintain an internal mapping from lowercase keys to the real keys in order to achieve the case insensitive lookup.
Note: This implementation does not allow null
for key, whereas LinkedHashMap does, because of the code:
key.toString().toLowerCase()
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
CaseInsensitiveHashMap() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object key) |
Object |
get(Object key) |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,?> m) |
Object |
remove(Object key) |
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putIfAbsent, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, sizepublic boolean containsKey(Object key)
containsKey in interface Map<String,Object>containsKey in class HashMap<String,Object>Copyright © 2023. All rights reserved.