API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. IdentityHashMap View Source
Author(s)
Doug Lea and Josh Bloch
Since
1.4
Version
Serial
Hierarchy
 Object
      AbstractMap
          IdentityHashMap
Implements
 Map
 Serializable
 Cloneable
Subclasses
Description
public class IdentityHashMap
  This class implements the Map interface with a hash table, using reference-equality in place of object-equality when comparing keys (and values).
Constructors
public IdentityHashMap ()
Constructs a new, empty identity hash map with a default expected maximum size (21).
public IdentityHashMap (int expectedMaxSize)
  Constructs a new, empty map with the specified expected maximum size.
public IdentityHashMap (Map<Object, Object> m)
  Constructs a new identity hash map containing the keys-value mappings in the specified map.
Methods
Hide/Show inherited methods
public void clear () [Overrides AbstractMap] [Specified in Map]
  Removes all of the mappings from this map.
public Object clone () [Overrides AbstractMap]
  Returns a shallow copy of this identity hash map: the keys and values themselves are not cloned.
public boolean containsKey (Object key) [Overrides AbstractMap] [Specified in Map]
  Tests whether the specified object reference is a key in this identity hash map.
public boolean containsValue (Object value) [Overrides AbstractMap] [Specified in Map]
  Tests whether the specified object reference is a value in this identity hash map.
public Set<Entry< K, V>> entrySet () [Specified in Map]
  Returns a Set view of the mappings contained in this map.
public boolean equals (Object o) [Overrides AbstractMap] [Specified in Map]
  Compares the specified object with this map for equality.
public V get (Object key) [Overrides AbstractMap] [Specified in Map]
  Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
public int hashCode () [Overrides AbstractMap] [Specified in Map]
  Returns the hash code value for this map.
public boolean isEmpty () [Overrides AbstractMap] [Specified in Map]
  Returns true if this identity hash map contains no key-value mappings.
public Set< K> keySet () [Overrides AbstractMap] [Specified in Map]
  Returns an identity-based set view of the keys contained in this map.
public V put ( K key, V value) [Overrides AbstractMap] [Specified in Map]
  Associates the specified value with the specified key in this identity hash map.
public void putAll (Map<Object, Object> m) [Overrides AbstractMap] [Specified in Map]
  Copies all of the mappings from the specified map to this map.
public V remove (Object key) [Overrides AbstractMap] [Specified in Map]
  Removes the mapping for this key from this map if present.
public int size () [Overrides AbstractMap] [Specified in Map]
  Returns the number of key-value mappings in this identity hash map.
public String toString () [Inherited From AbstractMap]
  Returns a string representation of this map.
public Collection< V> values () [Overrides AbstractMap] [Specified in Map]
  Returns a Collection view of the values contained in this map.
Fields
Hide/Show inherited fields
pack-privatetransientvolatile Set< K> keySet [Inherited From AbstractMap]
  Each of these fields are initialized to contain an instance of the appropriate view the first time this view is requested.
pack-privatetransientvolatile Collection< V> values [Inherited From AbstractMap]
Nested Classes
  AbstractMap.SimpleEntry
An Entry maintaining a key and a value.
  AbstractMap.SimpleImmutableEntry
An Entry maintaining an immutable key and value.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar