| Constructor and Description |
|---|
Dictionary()
Sole Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Enumeration<V> |
elements()
Returns an enumeration of the values in this dictionary.
|
abstract V |
get(K key)
Returns the value to which the key is mapped in this dictionary.
|
abstract boolean |
isEmpty()
Tests if this dictionary maps no keys to value.
|
abstract Enumeration<K> |
keys()
Returns an enumeration of the keys in this dictionary.
|
abstract V |
put(K key,
V value)
Maps the specified
key to the specified
value in this dictionary. |
abstract V |
remove(K key)
Removes the
key (and its corresponding
value) from this dictionary. |
abstract int |
size()
Returns the number of entries (distinct keys) in this dictionary.
|
public abstract Enumeration<V> elements()
public abstract V get(K key)
key - a key in this dictionary.public abstract boolean isEmpty()
true if this dictionary maps no keys to values;
false otherwise.public abstract Enumeration<K> keys()
public abstract V put(K key, V value)
key to the specified
value in this dictionary.key - the hashtable key.value - the value.key was mapped
in this dictionary, or null if the key did not
have a previous mapping.public abstract V remove(K key)
key (and its corresponding
value) from this dictionary.key - the key that needs to be removed.key had been mapped in this
dictionary, or null if the key did not have a
mapping.public abstract int size()