public final class

IdentityMap

extends Object
implements Map<K, V>
java.lang.Object
   ↳ org.hibernate.util.IdentityMap

Class Overview

A Map where keys are compared by object identity, rather than equals().

Summary

Nested Classes
class IdentityMap.IdentityKey  
class IdentityMap.IdentityMapEntry  
Public Methods
void clear()
static 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)
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()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Map

Public Methods

public void clear ()

public static 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().

Returns
  • Collection

public boolean containsKey (Object key)

public boolean containsValue (Object val)

public static Map deserialize (Object o)

Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not correctly deserialized.

Returns
  • Map

public static List entries (Map map)

public Entry[] entryArray ()

public List entryList ()

public Set entrySet ()

public Object get (Object key)

public static Map instantiate (int size)

Return a new instance of this class, with an undefined iteration order.

Parameters
size The size of the map
Returns
  • Map

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

Parameters
size The size of the map to create

public static Map invert (Map map)

public boolean isEmpty ()

public Iterator keyIterator ()

public static Iterator keyIterator (Map map)

public Set keySet ()

public Object put (Object key, Object value)

public void putAll (Map otherMap)

public Object remove (Object key)

public static Object serialize (Map map)

Workaround for a JDK 1.4.1 bug where IdentityHashMaps are not correctly deserialized.

Returns
  • Object

public int size ()

public String toString ()

public Collection values ()