java.util
public abstract class Dictionary<K,V> extends Object
Since: 1.0
UNKNOWN: updated to 1.4
Constructor Summary | |
---|---|
Dictionary()
Sole constructor (often called implicitly). |
Method Summary | |
---|---|
abstract Enumeration<V> | elements()
Returns an Enumeration of the values in this Dictionary.
|
abstract V | get(Object key)
Returns the value associated with the supplied key, or null
if no such value exists. |
abstract boolean | isEmpty()
Returns true when there are no elements in this Dictionary.
|
abstract Enumeration<K> | keys()
Returns an Enumeration of the keys in this Dictionary
|
abstract V | put(K key, V value)
Inserts a new value into this Dictionary, located by the
supplied key. |
abstract V | remove(Object key)
Removes from the Dictionary the value located by the given key. |
abstract int | size()
Returns the number of values currently in this Dictionary.
|
Returns: an Enumeration of the values
See Also: keys
Parameters: key the key to use to fetch the value
Returns: the mapped value
Throws: NullPointerException if key is null
See Also: Dictionary
Returns: size() == 0
Returns: an Enumeration of the keys
See Also: elements
Parameters: key the key which locates the value value the value to put into the Dictionary
Returns: the previous value of the key, or null if there was none
Throws: NullPointerException if key or value is null
See Also: get
Parameters: key the key used to locate the value to be removed
Returns: the value associated with the removed key
Throws: NullPointerException if key is null
Returns: the number of keys in the Dictionary