|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary
The Dictionary class is the abstract parent of Hashtable, which maps keys to values. Any object can be used as a key and/or value.
Hashtable
,
Object.hashCode()
,
Object.equals(java.lang.Object)
Constructor Summary | |
Dictionary()
|
Method Summary | |
abstract Enumeration |
elements()
Returns an enumeration of the elements. |
abstract Object |
get(Object key)
Gets the object associated with the specified key in the Dictionary. |
abstract boolean |
isEmpty()
Returns true if the Dictionary contains no elements. |
abstract Enumeration |
keys()
Returns an enumeration of the Dictionary's keys. |
abstract Object |
put(Object key,
Object value)
Puts the specified element into the Dictionary, using the specified key. |
abstract Object |
remove(Object key)
Removes the element corresponding to the key. |
abstract int |
size()
Returns the number of elements contained within the Dictionary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Dictionary()
Method Detail |
public abstract int size()
public abstract boolean isEmpty()
public abstract Enumeration keys()
elements()
,
Enumeration
public abstract Enumeration elements()
keys()
,
Enumeration
public abstract Object get(Object key)
key
- the key in the hash tableput(java.lang.Object, java.lang.Object)
public abstract Object put(Object key, Object value)
key
- the specified hashtable keyvalue
- the specified element
NullPointerException
- If the value of the specified
element is null.get(java.lang.Object)
public abstract Object remove(Object key)
key
- the key that needs to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |