Class CaseInsensitiveDictionary<V>
java.lang.Object
org.hibernate.internal.util.collections.CaseInsensitiveDictionary<V>
- Type Parameters:
V
- the type for the stored values.
Wraps a ConcurrentHashMap having all keys as Strings
and ensures all keys are lowercased.
It does assume keys and arguments are never null, preferring to throw a NPE
over adding unnecessary checks.
The public exposed methods are similar to the ones on Map, but
not all Map methods are exposed - only a selection we actually need; this
implies it doesn't implement Map; nothing stops us to make it implement Map
but at time of writing it seems unnecessary for our purposes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(String key) void
forEach
(BiConsumer<? super String, ? super V> action) Contrary to traditional Map, we make the return unmodifiable.Contrary to traditional Map, we make the return unmodifiable.
-
Constructor Details
-
CaseInsensitiveDictionary
public CaseInsensitiveDictionary()
-
-
Method Details
-
get
-
unmodifiableKeySet
Contrary to traditional Map, we make the return unmodifiable.- Returns:
- the map's keySet
-
unmodifiableEntrySet
Contrary to traditional Map, we make the return unmodifiable.- Returns:
- the map's entrySet
-
put
-
remove
-
containsKey
-
clear
public void clear() -
forEach
-