public abstract class Dictionary4D<K,V>
extends java.lang.Object
Map
interface
in the Collections framework.Map
,
Hashtable
Constructor and Description |
---|
Dictionary4D()
Sole constructor (often called implicitly).
|
Modifier and Type | Method and Description |
---|---|
abstract java.util.Enumeration<V> |
elements()
Returns an Enumeration of the values in this Dictionary.
|
abstract V |
get(java.lang.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 java.util.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(java.lang.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.
|
public abstract java.util.Enumeration<V> elements()
keys()
public abstract V get(java.lang.Object key)
key
- the key to use to fetch the valuejava.lang.NullPointerException
- if key is nullput(Object, Object)
public abstract boolean isEmpty()
size() == 0
public abstract java.util.Enumeration<K> keys()
elements()
public abstract V put(K key, V value)
key
- the key which locates the valuevalue
- the value to put into the Dictionaryjava.lang.NullPointerException
- if key or value is nullget(Object)
public abstract V remove(java.lang.Object key)
key
- the key used to locate the value to be removedjava.lang.NullPointerException
- if key is nullpublic abstract int size()