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, values
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putIfAbsent, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, size
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
containsKey
in class HashMap<String,Object>
Copyright © 2023. All rights reserved.