org.jtestcase.util
Class MultiKeyHashtable

java.lang.Object
  extended by org.jtestcase.util.MultiKeyHashtable

public class MultiKeyHashtable
extends java.lang.Object

This hashtable stores values using string array.

Author:
Yuqing Wang, Christian Kölle

Constructor Summary
MultiKeyHashtable()
           
 
Method Summary
 java.lang.Object get(java.lang.String[] keys)
          This method retrieves the value at String array keys.
 java.util.Set keySet()
          Returns an enumeration with the keys.
 void put(java.lang.String[] keys, java.lang.Object value)
          This method stores the value at String array keys.
 void putAll(MultiKeyHashtable pHash)
          Copies all of the mappings from the specified MultiKeyHashtable to this MultiKeyHashtable.
 void reset()
          Reset contents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiKeyHashtable

public MultiKeyHashtable()
Method Detail

get

public java.lang.Object get(java.lang.String[] keys)
This method retrieves the value at String array keys.

Parameters:
keys - - String array, must not be null
Returns:
Object the value or null if not found
Throws:
java.lang.NullPointerException - thrown if keys are null

put

public void put(java.lang.String[] keys,
                java.lang.Object value)
This method stores the value at String array keys.

Parameters:
keys - - must not be null
value -
Throws:
java.lang.NullPointerException - thrown if key1 or key2 are null

putAll

public void putAll(MultiKeyHashtable pHash)
Copies all of the mappings from the specified MultiKeyHashtable to this MultiKeyHashtable. These mappings will replace any mappings that this MultiKeyHashtable had for any of the keys currently in the specified MultiKeyHashtable.

Parameters:
pHash - The MultiKeyHashtable to be copied.

reset

public void reset()
Reset contents. Equals to Map::clear().


keySet

public java.util.Set keySet()
Returns an enumeration with the keys.

Returns:
The keys in an Enumeration