Share via


Hashtable Members

Class Overview | This Package | All Packages

Constructors

Name Description
Hashtable() Constructs a new, empty hashtable with a default capacity and load factor.
Hashtable(int) Constructs a new, empty hashtable with the specified initial capacity and default load factor.
Hashtable(int, float) Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.

Methods

Name Description
clear() Clears this hashtable so that it contains no keys.
clone() Creates a shallow copy of this hashtable.
contains(Object) Tests if some key maps into the specified value in this hashtable.
containsKey(Object) Tests if the specified object is a key in this hashtable.
elements() Returns an enumeration of the values in this hashtable.
get(Object) Returns the value to which the specified key is mapped in this hashtable.
isEmpty() Tests if this hashtable maps no keys to values.
keys() Returns an enumeration of the keys in this hashtable.
put(Object, Object) Maps the specified key to the specified value in this hashtable.
rehash() Rehashes the contents of the hashtable into a hashtable with a larger capacity.
remove(Object) Removes the key (and its corresponding value) from this hashtable.
size() Returns the number of keys in this hashtable.
toString() Returns a rather long string representation of this hashtable.