org.paneris.util
Class ExtendedHash

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by org.paneris.util.ExtendedHash
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map
Direct Known Subclasses:
DDRecord

public class ExtendedHash
extends java.util.Hashtable

This class provides extended facilities to a hashtable paticularly, it will return keys and values in the order they were added, allowing it to be used as a vector.

See Also:
Serialized Form

Constructor Summary
ExtendedHash()
          Normal constructor.
ExtendedHash(int initialCapacity)
          constructor with capacity
ExtendedHash(int initialCapacity, float loadFactor)
          constructor with capacity and loadfactor
ExtendedHash(java.util.Vector a, java.util.Vector b)
          constructor - make a hashtable out of 2 vectors: a keys and b values
 
Method Summary
 void clear()
          zap this Extended hashtable
 java.util.Enumeration elements()
          return the elements as a vector in the order they were added
 java.lang.String joinKeys(java.lang.String deliminator)
          join the keys together with the specified deliminator
 java.util.Enumeration keys()
          return the keys as a vector in the order they were added
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          add an item to the ExtendedHash
 java.lang.Object remove(java.lang.Object key)
          remove an item from the ExtendedHash
 
Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedHash

public ExtendedHash()
Normal constructor.


ExtendedHash

public ExtendedHash(int initialCapacity,
                    float loadFactor)
constructor with capacity and loadfactor


ExtendedHash

public ExtendedHash(int initialCapacity)
constructor with capacity


ExtendedHash

public ExtendedHash(java.util.Vector a,
                    java.util.Vector b)
constructor - make a hashtable out of 2 vectors: a keys and b values

Method Detail

clear

public void clear()
zap this Extended hashtable

Specified by:
clear in interface java.util.Map
Overrides:
clear in class java.util.Hashtable

elements

public java.util.Enumeration elements()
return the elements as a vector in the order they were added

Overrides:
elements in class java.util.Hashtable

keys

public java.util.Enumeration keys()
return the keys as a vector in the order they were added

Overrides:
keys in class java.util.Hashtable

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
add an item to the ExtendedHash

Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.Hashtable

remove

public java.lang.Object remove(java.lang.Object key)
remove an item from the ExtendedHash

Specified by:
remove in interface java.util.Map
Overrides:
remove in class java.util.Hashtable

joinKeys

public java.lang.String joinKeys(java.lang.String deliminator)
join the keys together with the specified deliminator



Copyright © 2000-2008 PanEris. All Rights Reserved.