org.hibernate.util
Class IdentityMap
java.lang.Object
org.hibernate.util.IdentityMap
- Map
public final class IdentityMap
extends java.lang.Object
implements Map
A Map where keys are compared by object identity,
rather than equals().
void | clear()
|
static Map.Entry[] | concurrentEntries(Map map) - Return the map entries (as instances of Map.Entry in a collection that
is safe from concurrent modification).
|
boolean | containsKey(Object key)
|
boolean | containsValue(Object val)
|
static Map | deserialize(Object o) - Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not
correctly deserialized.
|
static List | entries(Map map)
|
Map.Entry[] | entryArray()
|
List | entryList()
|
Set | entrySet()
|
Object | get(Object key)
|
static Map | instantiate(int size) - Return a new instance of this class, with an undefined
iteration order.
|
static Map | instantiateSequenced(int size) - Return a new instance of this class, with iteration
order defined as the order in which entries were added
|
static Map | invert(Map map)
|
boolean | isEmpty()
|
Iterator | keyIterator()
|
static Iterator | keyIterator(Map map)
|
Set | keySet()
|
Object | put(Object key, Object value)
|
void | putAll(Map otherMap)
|
Object | remove(Object key)
|
static Object | serialize(Map map) - Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not
correctly deserialized.
|
int | size()
|
String | toString()
|
Collection | values()
|
concurrentEntries
public static Map.Entry[] concurrentEntries(Map map)
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().
containsKey
public boolean containsKey(Object key)
containsValue
public boolean containsValue(Object val)
deserialize
public static Map deserialize(Object o)
Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not
correctly deserialized.
entries
public static List entries(Map map)
entryArray
public Map.Entry[] entryArray()
entryList
public List entryList()
entrySet
public Set entrySet()
get
public Object get(Object key)
instantiate
public static Map instantiate(int size)
Return a new instance of this class, with an undefined
iteration order.
size
- The size of the map
instantiateSequenced
public static Map instantiateSequenced(int size)
Return a new instance of this class, with iteration
order defined as the order in which entries were added
size
- The size of the map to create
invert
public static Map invert(Map map)
isEmpty
public boolean isEmpty()
keyIterator
public Iterator keyIterator()
keyIterator
public static Iterator keyIterator(Map map)
keySet
public Set keySet()
put
public Object put(Object key,
Object value)
putAll
public void putAll(Map otherMap)
remove
public Object remove(Object key)
serialize
public static Object serialize(Map map)
Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not
correctly deserialized.
toString
public String toString()
values
public Collection values()