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 TypeMethodDescriptionvoid
clear()
static <K,
V> Map.Entry<K, V>[] concurrentEntries
(Map<K, V> map) Return the map entries (as instances ofMap.Entry
in a collection that is safe from concurrent modification).boolean
containsKey
(Object key) boolean
containsValue
(Object val) entrySet()
void
forEach
(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 addedboolean
isEmpty()
keySet()
static <K,
V> void void
int
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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.Entry
in a collection that is safe from concurrent modification). ie. we may safely add new instances to the underlyingMap
during 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:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
entryArray
-
toString
-