java.util
public
abstract
class
java.util.Dictionary<K, V>
Dictionary is a abstract class which is the superclass of all classes that
associate keys with values, such as Hashtable.
Known Direct Subclasses
Hashtable<K, V> |
Hashtable associates keys with values. |
Known Indirect Subclasses
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
Dictionary()
Constructs a new instance of this class.
Public Methods
public
abstract
Enumeration<V>
elements()
Returns an Enumeration on the elements of this Dictionary.
Returns
- an Enumeration of the values of this Dictionary
public
abstract
V
get(Object key)
Returns the value associated with
key
.
Parameters
key
| the key of the value returned |
Returns
- the value associated with
key
or null
if the specified key does not exist
public
abstract
boolean
isEmpty()
Returns if this Dictionary has no key/value pairs, a size of zero.
Returns
- true if this Dictionary has no key/value pairs, false otherwise
public
abstract
Enumeration<K>
keys()
Returns an Enumeration on the keys of this Dictionary.
Returns
- an Enumeration of the keys of this Dictionary
public
abstract
V
put(K key, V value)
Associate
key
with
value
in this
Dictionary
. If
key
exists in the
Dictionary
prior to this call being made, the old value is
replaced.
Parameters
key
| the key to add |
value
| the value to add |
Returns
- the old value previously associated with
key
or
null
if key
is new to the
Dictionary
.
public
abstract
V
remove(Object key)
Remove the key/value pair with the specified
key
from this
Dictionary
.
Returns
- the associated value or else
null
if
key
is not known to this Dictionary
public
abstract
int
size()
Returns the number of key/value pairs in this Dictionary.
Returns
- the number of key/value pairs in this Dictionary