java.util
Class Hashtable
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
- All Implemented Interfaces:
- Cloneable, Map, java.io.Serializable
- Direct Known Subclasses:
- Properties
- public synchronized class Hashtable
- extends Dictionary
- implements Map, Cloneable, java.io.Serializable
Hashtable
public Hashtable(int,
float)
Hashtable
public Hashtable(int)
Hashtable
public Hashtable()
Hashtable
public Hashtable(Map)
size
public int size()
- Specified by:
size
in interface Map
- Specified by:
size
in class Dictionary
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in class Dictionary
keys
public Enumeration keys()
- Specified by:
keys
in class Dictionary
elements
public Enumeration elements()
- Specified by:
elements
in class Dictionary
contains
public boolean contains(Object)
containsValue
public boolean containsValue(Object)
containsKey
public boolean containsKey(Object)
- Specified by:
containsKey
in interface Map
get
public Object get(Object)
- Specified by:
get
in interface Map
- Specified by:
get
in class Dictionary
rehash
protected void rehash()
put
public Object put(Object,
Object)
- Specified by:
put
in interface Map
- Specified by:
put
in class Dictionary
remove
public Object remove(Object)
- Specified by:
remove
in class Dictionary
putAll
public void putAll(Map)
clear
public void clear()
clone
public Object clone()
toString
public String toString()
- Overrides:
toString
in class Object
keySet
public Set keySet()
- Specified by:
keySet
in interface Map
entrySet
public Set entrySet()
values
public Collection values()
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 Object
- 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 Object