jmri.util
Class OrderedHashtable<K,V>

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<K,V>
          extended by jmri.util.OrderedHashtable<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

public class OrderedHashtable<K,V>
extends Hashtable<K,V>

Hashtable that preserves order for later access.

Author:
Bob Jacobsen
See Also:
Serialized Form

Constructor Summary
OrderedHashtable()
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 Enumeration<K> keys()
           
 V put(K key, V value)
           
 V remove(Object key)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keySet, putAll, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrderedHashtable

public OrderedHashtable()
Method Detail

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K,V>
Overrides:
put in class Hashtable<K,V>

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V>
Overrides:
remove in class Hashtable<K,V>

keys

public Enumeration<K> keys()
Overrides:
keys in class Hashtable<K,V>

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<K,V>
Overrides:
equals in class Hashtable<K,V>

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<K,V>
Overrides:
hashCode in class Hashtable<K,V>


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads