danger.util
Class IdentityHashtable

java.lang.Object
  extended by java.util.Dictionary
      extended by danger.util.IdentityHashtable
All Implemented Interfaces:
Serializable, Cloneable, Map


public class IdentityHashtable
extends Dictionary
implements Map, Cloneable, Serializable

An implementation of the J2SE IdentityHashMap class, using the Hashtable interface for CLDC consistency. Keys are hashed using System.identityHashCode(key), instead of key.hashCode(), and reference equality is used instead of key.equals(key2).

This class is thread-safe.

See Also:
IdentityHashMap, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
IdentityHashtable()
           
IdentityHashtable(int expectedMaxSize)
           
IdentityHashtable(Map m)
           
 
Method Summary
 void clear()
           
 Object clone()
           
 boolean contains(Object value)
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Enumeration elements()
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 int hashCode()
           
 boolean isEmpty()
           
 Enumeration keys()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
 int size()
           
 String toString()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityHashtable

public IdentityHashtable()

IdentityHashtable

public IdentityHashtable(int expectedMaxSize)

IdentityHashtable

public IdentityHashtable(Map m)
Method Detail

clear

public void clear()
Specified by:
clear in interface Map

clone

public Object clone()
Overrides:
clone in class Object

contains

public boolean contains(Object value)

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

elements

public Enumeration elements()
Specified by:
elements in class Dictionary

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

equals

public boolean equals(Object o)
Specified by:
equals in interface Map
Overrides:
equals in class Object

get

public Object get(Object key)
Specified by:
get in interface Map
Specified by:
get in class Dictionary

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Specified by:
isEmpty in class Dictionary

keys

public Enumeration keys()
Specified by:
keys in class Dictionary

keySet

public Set keySet()
Specified by:
keySet in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
Specified by:
put in class Dictionary

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map
Specified by:
remove in class Dictionary

size

public int size()
Specified by:
size in interface Map
Specified by:
size in class Dictionary

toString

public String toString()
Overrides:
toString in class Object

values

public Collection values()
Specified by:
values in interface Map