Class IdentityMap<K,V>
java.lang.Object
org.hibernate.internal.util.collections.IdentityMap<K,V>
- All Implemented Interfaces:
Map<K,V>
A
Map where keys are compared by object identity,
rather than using Object.equals(Object).-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static <K,V> Map.Entry<K, V>[] concurrentEntries(Map<K, V> map) Return the map entries (as instances ofMap.Entryin a collection that is safe from concurrent modification).booleancontainsKey(Object key) booleancontainsValue(Object val) entrySet()voidforEach(BiConsumer<? super K, ? super V> action) OverridesMap.forEach(BiConsumer)with a more efficient implementation.static <K,V> IdentityMap <K, V> instantiateSequenced(int size) Return a new instance of this class, with iteration order defined as the order in which entries were addedbooleanisEmpty()keySet()static <K,V> void voidintsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
instantiateSequenced
Return a new instance of this class, with iteration order defined as the order in which entries were added- Parameters:
size- The size of the map to create- Returns:
- The map
-
concurrentEntries
Return the map entries (as instances ofMap.Entryin a collection that is safe from concurrent modification). That is, we may safely add new instances to the underlyingMapduring iteration of theentries().- Parameters:
map- The map of entries
-
onEachKey
-
forEach
OverridesMap.forEach(BiConsumer)with a more efficient implementation. -
keyIterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
entryArray
-
toString
-