|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--OrderedHashtable
The class `OrderedHashtable' is a subclass of Hashtable that records the order of keys (by overriding the methods put and remove), and adds a method keyListIterator to return an iterator over the keys in the order in which they were put.
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary | |
OrderedHashtable()
Constructs an empty ordered hashtable. |
Method Summary | |
java.util.ListIterator |
keyListIterator()
Returns an iterator over the keys in this hashtable, in the order that they were put. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this hashtable. |
java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this hashtable. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OrderedHashtable()
Method Detail |
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in class java.util.Hashtable
key
- the hashtable key.value
- the value.public java.lang.Object remove(java.lang.Object key)
remove
in class java.util.Hashtable
key
- the key that needs to be removed.public java.util.ListIterator keyListIterator()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |