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 equals().-
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). ie. we may safely add new instances to the underlyingMapduring iteration of theentries().booleancontainsKey(Object key) booleancontainsValue(Object val) entrySet()voidforEach(BiConsumer<? super K, ? super V> action) Override MapforEach(BiConsumer)to provide a more efficient implementationstatic <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). ie. we may safely add new instances to the underlyingMapduring iteration of theentries().- Parameters:
map- The map of entries- Returns:
- Collection
-
onEachKey
-
forEach
Override MapforEach(BiConsumer)to provide 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
-