Class IdentityMap<K,V>
- java.lang.Object
-
- org.hibernate.internal.util.collections.IdentityMap<K,V>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()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)Map.Entry<K,V>[]entryArray()Set<Map.Entry<K,V>>entrySet()voidforEach(BiConsumer<? super K,? super V> action)Override MapforEach(BiConsumer)to provide a more efficient implementationVget(Object key)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()Iterator<K>keyIterator()Set<K>keySet()static <K,V>
voidonEachKey(Map<K,V> map, Consumer<K> consumer)Vput(K key, V value)voidputAll(Map<? extends K,? extends V> otherMap)Vremove(Object key)intsize()StringtoString()Collection<V>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 Detail
-
instantiateSequenced
public 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 added- Parameters:
size- The size of the map to create- Returns:
- The map
-
concurrentEntries
public 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().- Parameters:
map- The map of entries- Returns:
- Collection
-
forEach
public void forEach(BiConsumer<? super K,? super V> action)
Override MapforEach(BiConsumer)to provide a more efficient implementation
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object val)
- Specified by:
containsValuein interfaceMap<K,V>
-
-