API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. Hashtable View Source
Author(s)
Arthur van Hoff
Josh Bloch
Neal Gafter
Since
JDK1.0
Version
1.116, 05/26/06
Serial
Hierarchy
 Object
      Dictionary
          Hashtable
Implements
 Map
 Cloneable
 Serializable
Subclasses
Description
public class Hashtable
  This class implements a hashtable, which maps keys to values.
Constructors
public Hashtable ()
Constructs a new, empty hashtable with a default initial capacity (11) and load factor (0.75).
public Hashtable (int initialCapacity)
  Constructs a new, empty hashtable with the specified initial capacity and default load factor (0.75).
public Hashtable (int initialCapacity, float loadFactor)
  Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
public Hashtable (Map<Object, Object> t)
  Constructs a new hashtable with the same mappings as the given Map.
Methods
Hide/Show inherited methods
publicsynchronized void clear () [Specified in Map]
Clears this hashtable so that it contains no keys.
publicsynchronized Object clone ()
  Creates a shallow copy of this hashtable.
publicsynchronized boolean contains (Object value)
  Tests if some key maps into the specified value in this hashtable.
publicsynchronized boolean containsKey (Object key) [Specified in Map]
  Tests if the specified object is a key in this hashtable.
public boolean containsValue (Object value) [Specified in Map]
  Returns true if this hashtable maps one or more keys to this value.
publicsynchronized Enumeration< V> elements () [Specified in Dictionary]
  Returns an enumeration of the values in this hashtable.
public Set<Entry< K, V>> entrySet () [Specified in Map]
  Returns a Set view of the mappings contained in this map.
publicsynchronized boolean equals (Object o) [Specified in Map]
  Compares the specified Object with this Map for equality, as per the definition in the Map interface.
publicsynchronized V get (Object key) [Specified in Map]
  Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
publicsynchronized int hashCode () [Specified in Map]
  Returns the hash code value for this Map as per the definition in the Map interface.
publicsynchronized boolean isEmpty () [Specified in Map]
  Tests if this hashtable maps no keys to values.
publicsynchronized Enumeration< K> keys () [Specified in Dictionary]
  Returns an enumeration of the keys in this hashtable.
public Set< K> keySet () [Specified in Map]
  Returns a Set view of the keys contained in this map.
publicsynchronized V put ( K key, V value) [Specified in Map]
  Maps the specified key to the specified value in this hashtable.
publicsynchronized void putAll (Map<Object, Object> t) [Specified in Map]
  Copies all of the mappings from the specified map to this hashtable.
protected void rehash ()
  Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently.
publicsynchronized V remove (Object key) [Specified in Map]
  Removes the key (and its corresponding value) from this hashtable.
publicsynchronized int size () [Specified in Map]
  Returns the number of keys in this hashtable.
publicsynchronized String toString ()
  Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space).
public Collection< V> values () [Specified in Map]
  Returns a Collection view of the values contained in this map.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar