java.util
Class IdentityHashMap
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.IdentityHashMap
- All Implemented Interfaces:
- Cloneable, Map, java.io.Serializable
- public synchronized class IdentityHashMap
- extends AbstractMap
- implements Map, java.io.Serializable, Cloneable
IdentityHashMap
public IdentityHashMap()
IdentityHashMap
public IdentityHashMap(int)
IdentityHashMap
public IdentityHashMap(Map)
size
public int size()
- Specified by:
size
in interface Map
- Overrides:
size
in class AbstractMap
isEmpty
public boolean isEmpty()
- Overrides:
isEmpty
in class AbstractMap
get
public Object get(Object)
- Specified by:
get
in interface Map
- Overrides:
get
in class AbstractMap
containsKey
public boolean containsKey(Object)
- Specified by:
containsKey
in interface Map
- Overrides:
containsKey
in class AbstractMap
containsValue
public boolean containsValue(Object)
- Overrides:
containsValue
in class AbstractMap
put
public Object put(Object,
Object)
- Specified by:
put
in interface Map
- Overrides:
put
in class AbstractMap
putAll
public void putAll(Map)
- Overrides:
putAll
in class AbstractMap
remove
public Object remove(Object)
- Overrides:
remove
in class AbstractMap
clear
public void clear()
- Overrides:
clear
in class AbstractMap
equals
public boolean equals(Object)
- Description copied from class:
Object
- Determines if this object is "equal" to another object.
In general, objects should be instances of the same class
with the same guts to be considered equal. For example,
the code below only prints same value since
s
and t
are different strings though
they have the same value: "hello".
String s = new String("hello");
String t = new String("hello");
if (s.equals(t)) System.out.println("same value");
if (s == t) System.out.println("same string");
- Overrides:
equals
in class AbstractMap
- Following copied from class:
java.lang.Object
- Parameters:
is
- the other Object to which this one is compared- Returns:
- true if this Object is equal to
other
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractMap
clone
public Object clone()
- Overrides:
clone
in class AbstractMap
keySet
public Set keySet()
- Specified by:
keySet
in interface Map
- Overrides:
keySet
in class AbstractMap
values
public Collection values()
- Overrides:
values
in class AbstractMap
entrySet
public Set entrySet()
- Specified by:
entrySet
in class AbstractMap