Known Direct Subclasses
Hashtable<K, V> |
Hashtable associates keys with values. |
|
Known Indirect Subclasses
AuthProvider |
AuthProvider is an abstract superclass for Java Security Provider which provide login and logout. |
Properties |
A Properties object is a Hashtable where the keys and values
must be String s. |
Provider |
Provider is the abstract superclass for all security providers in the
Java security infrastructure. |
|
Class Overview
Note: Do not use this class since it is obsolete. Please use the
Map
interface for new implementations.
Dictionary is an 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 which is associated with key .
|
abstract
boolean
|
isEmpty()
Returns true if this dictionary has no key/value pairs.
|
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)
Removes 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()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
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 which is 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 true if this dictionary has no key/value pairs.
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 before this call, the old value in the
dictionary is replaced by value
.
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)
Removes the key/value pair with the specified key
from this
dictionary.
Returns
- the associated value before the deletion or
null
if
key
was 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.