Package org.hibernate.util
Class IdentityMap
java.lang.Object
org.hibernate.util.IdentityMap
- All Implemented Interfaces:
Map
A Map where keys are compared by object identity,
rather than equals().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static Map.Entry[]concurrentEntries(Map map) Return the map entries (as instances of Map.Entry in a collection that is safe from concurrent modification).booleancontainsKey(Object key) booleancontainsValue(Object val) static MapWorkaround for a JDK 1.4.1 bug where IdentityHashMaps are not correctly deserialized.static ListentrySet()static Mapinstantiate(int size) Return a new instance of this class, with an undefined iteration order.static MapinstantiateSequenced(int size) Return a new instance of this class, with iteration order defined as the order in which entries were addedstatic MapbooleanisEmpty()static IteratorkeyIterator(Map map) keySet()voidstatic ObjectWorkaround for a JDK 1.4.1 bug where IdentityHashMaps are not correctly deserialized.intsize()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, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
instantiate
Return a new instance of this class, with an undefined iteration order.- Parameters:
size- The size of the map- Returns:
- Map
-
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:
-
concurrentEntries
Return the map entries (as instances of Map.Entry in a collection that is safe from concurrent modification). ie. we may safely add new instances to the underlying Map during iteration of the entries().- Parameters:
map-- Returns:
- Collection
-
entries
-
keyIterator
-
keyIterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap
-
containsValue
- Specified by:
containsValuein interfaceMap
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
entryList
-
entryArray
-
serialize
Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not correctly deserialized.- Parameters:
map-- Returns:
- Object
-
deserialize
Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not correctly deserialized.- Parameters:
o-- Returns:
- Map
-
toString
-
invert
-