util
Class Hashtable2

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--util.Hashtable2

public class Hashtable2
extends Hashtable

An extension of the Java Hashtable that allows you to address things by either 1 or 2 keys. Implemented as Hashtables inside Hashtables.

See Also:
Serialized Form

Constructor Summary
Hashtable2()
           
 
Method Summary
 Object get(Object key1, Object key2)
           
 Enumeration keyPairs()
          Returns an Enumeration of Object arrays holding the pairs of keys for addressing all elements in this two-level hashtable.
 Enumeration keys(Object key1)
          Returns keys of a nested hashtable.
 Set keySet(Object key1)
           
 Object put(Object key1, Object key2, Object value)
           
 Object remove(Object key1, Object key2)
           
 int size()
          Returns the number of all (leaf) objects stored here.
 int size(Object key1)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Hashtable2

public Hashtable2()
Method Detail

put

public Object put(Object key1,
                  Object key2,
                  Object value)

get

public Object get(Object key1,
                  Object key2)

remove

public Object remove(Object key1,
                     Object key2)

keys

public Enumeration keys(Object key1)
Returns keys of a nested hashtable.

keySet

public Set keySet(Object key1)

size

public int size()
Returns the number of all (leaf) objects stored here.
Overrides:
size in class Hashtable

size

public int size(Object key1)

keyPairs

public Enumeration keyPairs()
Returns an Enumeration of Object arrays holding the pairs of keys for addressing all elements in this two-level hashtable. For elements stored at the first level, the second key is null