Known Direct Subclasses
| Hashtable<K, V> |
Hashtable associates keys with values. |
|
Known Indirect Subclasses
|
Class Overview
Dictionary is a abstract class which is the superclass of all classes that
associate keys with values, such as Hashtable.
Summary
| Public Constructors |
|
|
Dictionary()
Constructs a new instance of this class.
|
| Public Methods |
|
abstract
Enumeration<V>
|
elements()
Returns an Enumeration on the elements of this Dictionary.
|
|
abstract
V
|
get(Object key)
Returns the value associated with key.
|
|
abstract
boolean
|
isEmpty()
Returns if this Dictionary has no key/value pairs, a size of zero.
|
|
abstract
Enumeration<K>
|
keys()
Returns an Enumeration on the keys of this Dictionary.
|
|
abstract
V
|
put(K key, V value)
Associate key with value in this
Dictionary.
|
|
abstract
V
|
remove(Object key)
Remove the key/value pair with the specified key from this
Dictionary.
|
|
abstract
int
|
size()
Returns the number of key/value pairs in this Dictionary.
|
|
[Expand]
Inherited Methods |
From class java.lang.Object
|
Object
|
clone()
Returns a new instance of the same class as the receiver, whose slots
have been filled in with the values in the slots of the receiver.
|
|
boolean
|
equals(Object o)
Compares the argument to the receiver, and returns true if they represent
the same object using a class specific comparison.
|
|
void
|
finalize()
Called by the virtual machine when there are no longer any (non-weak)
references to the receiver.
|
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of java.lang.Class which represents the class
of the receiver.
|
|
int
|
hashCode()
Returns an integer hash code for the receiver.
|
|
final
void
|
notify()
Causes one thread which is wait ing on the receiver to be
made ready to run.
|
|
final
void
|
notifyAll()
Causes all threads which are wait ing on the receiver to
be made ready to run.
|
|
String
|
toString()
Returns a string containing a concise, human-readable description of the
receiver.
|
|
final
void
|
wait(long time, int frac)
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll) or the expiration of
the timeout.
|
|
final
void
|
wait(long time)
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll) or the expiration of
the timeout.
|
|
final
void
|
wait()
Causes the thread which sent this message to be made not ready to run
pending some change in the receiver (as indicated by notify
or notifyAll).
|
|
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