Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

  • Nested Class Summary

    Nested classes/interfaces declared in interface Map

    Map.Entry<K,V>

  • Constructor Summary

    Constructors

    Constructs a new, empty identity hash map with a default expected maximum size (21).

    IdentityHashMap(int expectedMaxSize)

    Constructs a new, empty map with the specified expected maximum size.

    IdentityHashMap(Map<? extends K, ? extends V> m)

    Constructs a new identity hash map containing the key-value mappings in the specified map.

  • Method Summary

    void

    clear()

    Removes all of the mappings from this map.

    clone()

    Returns a shallow copy of this identity hash map: the keys and values themselves are not cloned.

    boolean

    Tests whether the specified object reference is a key in this identity hash map.

    boolean

    Tests whether the specified object reference is a value in this identity hash map.

    entrySet()

    Returns a Set view of the mappings contained in this map.

    boolean

    Compares the specified object with this map for equality.

    Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

    int

    hashCode()

    Returns the hash code value for this map.

    boolean

    isEmpty()

    Returns true if this identity hash map contains no key-value mappings.

    keySet()

    Returns an identity-based set view of the keys contained in this map.

    put(K key, V value)

    Associates the specified value with the specified key in this identity hash map.

    void

    putAll(Map<? extends K, ? extends V> m)

    Copies all of the mappings from the specified map to this map.

    Removes the mapping for this key from this map if present.

    boolean

    Removes the entry for the specified key only if it is currently mapped to the specified value (optional operation).

    boolean

    replace(K key, V oldValue, V newValue)

    Replaces the entry for the specified key only if currently mapped to the specified value (optional operation).

    int

    size()

    Returns the number of key-value mappings in this identity hash map.

    values()

    Returns a Collection view of the values contained in this map.

  • Constructor Details

    • IdentityHashMap

    • IdentityHashMap

    • IdentityHashMap

  • Method Details

    • size

    • isEmpty

    • get

    • containsKey

    • containsValue

    • put

    • putAll

    • remove

    • clear

    • equals

    • hashCode

    • clone

    • keySet

    • values

    • entrySet

    • remove

    • replace