java.util.Dictionary
java.lang.Object
java.util.Hashtable
None
JDK 1.0 or later
The Dictionary class is an abstract class that associates keys with values. Any non-null object can be used as a key or as a value. Key/value pairs can be stored in a Dictionary, and values can be retrieved or removed using their associated keys.
A subclass of Dictionary should use the equals() method to decide if two keys are equivalent.
public abstract class java.util.Dictionary extends java.lang.Object { // Instance Methods public abstract Enumeration elements(); public abstract Object get(Object key); public abstract boolean isEmpty(); public abstract Enumeration keys(); public abstract Object put(Object key, Object value); public abstract Object remove(Object key); public abstract int size(); }
The values in the dictionary as an Enumeration.
This method returns an Enumeration that iterates through the values in this Dictionary.
The key of the value to retrieve.
The value that corresponds to this key.
This method returns the value that is associated with the given key.
true if there are no values in the Dictionary7thinsp;; false otherwise.
This method returns a boolean value that indicates whether or not the Dictionary is empty.
The keys in the dictionary as an Enumeration.
This method returns an Enumeration that iterates through the keys in this Dictionary.
A key object.
A value object.
The previous value associated with the given key or null if key has not previously been associated with a value.
If either the key or the value is null.
This method associates the given key with the given value in this Dictionary.
The key of the value to remove.
The value associated with the given key or null if key is not associated with a value.
This method removes a key/value pair from this Dictionary. If the given key is not in the Dictionary, the method does nothing.
The number of keys in the Dictionary.
This method returns the number of key/value pairs in this Dictionary.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Enumeration, Hashtable, NullPointerException