java.lang.Object | +--org.apache.commons.collections.map.AbstractHashedMap | +--org.apache.commons.collections.map.IdentityMapAll Implemented Interfaces:
Constructs a new empty map with default size and load factor. |
IdentityMap(int initialCapacity) Constructs a new, empty map with the specified initial capacity. |
IdentityMap(int initialCapacity, float loadFactor) Constructs a new, empty map with the specified initial capacity and load factor. |
IdentityMap(Map map) Constructor copying elements from another map. |
Object | clone() Clones the map without cloning the keys or values. |
createEntry(AbstractHashedMap.HashEntry next, int hashCode, Object key, Object value) Creates an entry to store the data. | |
int | hash(Object key) Gets the hash code for the key specified. |
boolean | isEqualKey(Object key1, Object key2) Compares two keys for equals. |
boolean | isEqualValue(Object value1, Object value2) Compares two values for equals. |
public IdentityMap()
public IdentityMap(int initialCapacity, float loadFactor)
- if the initial capacity is less than one
- if the load factor is less than zeropublic IdentityMap(int initialCapacity)
- if the initial capacity is less than onepublic IdentityMap(Map map)
- if the map is nullpublic Object clone()
protected AbstractHashedMap.HashEntry createEntry(AbstractHashedMap.HashEntry next, int hashCode, Object key, Object value)
protected int hash(Object key)
protected boolean isEqualKey(Object key1, Object key2)
==
.
protected boolean isEqualValue(Object value1, Object value2)
==
.
Map
implementation that matches keys and values based on==
notequals()
. This map will violate the detail of various Map and map view contracts. As a general rule, don't compare this map to other maps.