|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
dods.util.SortedTable
SortedTable looks exactly like Hashtable but preserves the insertion order of elements. While this results in slower performance, it ensures that the DAS will always be printed in the same order in which it was read.
Constructor Summary | |
SortedTable()
|
Method Summary | |
java.lang.Object |
elementAt(int index)
Returns the element at the specified index. |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this table. |
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the key is mapped in this table. |
java.util.Vector |
getElementVector()
Returns a Vector containing the elements in the SortedTable. |
java.lang.Object |
getKey(int index)
Returns the key at the specified index. |
boolean |
isEmpty()
Tests if this table is empty. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys in this table. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this table. |
java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this table. |
int |
size()
Returns the number of keys in this table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SortedTable()
Method Detail |
public int size()
public boolean isEmpty()
public java.util.Enumeration keys()
public java.util.Enumeration elements()
public java.lang.Object get(java.lang.Object key)
key
- a key in this table.
public java.lang.Object getKey(int index)
index
- the index to return
public java.lang.Object elementAt(int index)
index
- the index to return
public java.lang.Object put(java.lang.Object key, java.lang.Object value) throws java.lang.NullPointerException
key
- the keyvalue
- the value
java.lang.NullPointerException
public java.lang.Object remove(java.lang.Object key)
key
- the key to remove.
public java.util.Vector getElementVector()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |