|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--java.util.Hashtable
This implements a hashtable, which maps keys/value pairs.
Any non-null Objects may be used as keys or values.
This hashtable does not do any rehashing
| Constructor Summary | |
Hashtable()
Create a new hashtable with the default capacity. |
|
Hashtable(int cap)
Creates a new hashtable the given starting capacity |
|
| Method Summary | |
void |
clear()
Clears this hashtable. |
boolean |
contains(Object value)
Tests if the given value exists in the Hashtable. |
boolean |
containsKey(Object key)
Tests if the specified object is a key in this hashtable. |
Enumeration |
elements()
Returns an enumeration of the values in this hashtable. |
Object |
get(Object key)
Returns the value mapped to the given key |
boolean |
isEmpty()
See if the table is empty |
Enumeration |
keys()
Returns an enumeration of the keys in this hashtable. |
Object |
put(Object key,
Object value)
Maps a key to a value. |
Object |
remove(Object key)
Removes the key (and its corresponding value) from this hashtable. |
int |
size()
Returns the number of keys in the hashtable. |
java.lang.String |
toString()
Returns a rather long string representation of this hashtable. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Hashtable()
public Hashtable(int cap)
cap - the initial capacity of the hashtable.
IllegalArgumentException - if the initial capacity is less
than zero| Method Detail |
public void clear()
public boolean contains(Object value)
value - a value to search for.
true if the value exists in the table
false otherwise.
NullPointerException - if the value is null.public boolean containsKey(Object key)
key - possible key.
true if the specified object is a key in this
hashtable; false otherwise.public Enumeration elements()
public Object get(Object key)
key - a key in the hashtable.
public boolean isEmpty()
public Enumeration keys()
public Object put(Object key,
Object value)
null.
The value can be retrieved by calling the get(Object key)
method with a key that is equal to the original key.
key - the hashtable key.value - the value.
null if it did not have one.
NullPointerException - if the key or value is
null.public Object remove(Object key)
key - the key that needs to be removed.
null if the key did not have a mapping.public int size()
public java.lang.String toString()
toString in class Object
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||