FileDocCategorySizeDatePackage
Dictionary.javaAPI DocAndroid 1.5 API3832Wed May 06 22:41:04 BST 2009java.util

Dictionary

public abstract class Dictionary extends Object
Note: Do not use this class since it is obsolete. Please use the {@link Map} interface for new implementations.

Dictionary is an abstract class which is the superclass of all classes that associate keys with values, such as {@code Hashtable}.

see
Hashtable
since
Android 1.0

Fields Summary
Constructors Summary
public Dictionary()
Constructs a new instance of this class.

since
Android 1.0

        super();
    
Methods Summary
public abstract java.util.Enumerationelements()
Returns an enumeration on the elements of this dictionary.

return
an enumeration of the values of this dictionary.
see
#keys
see
#size
see
Enumeration
since
Android 1.0

public abstract Vget(java.lang.Object key)
Returns the value which is associated with {@code key}.

param
key the key of the value returned.
return
the value associated with {@code key}, or {@code null} if the specified key does not exist.
see
#put
since
Android 1.0

public abstract booleanisEmpty()
Returns true if this dictionary has no key/value pairs.

return
{@code true} if this dictionary has no key/value pairs, {@code false} otherwise.
see
#size
since
Android 1.0

public abstract java.util.Enumerationkeys()
Returns an enumeration on the keys of this dictionary.

return
an enumeration of the keys of this dictionary.
see
#elements
see
#size
see
Enumeration
since
Android 1.0

public abstract Vput(K key, V value)
Associate {@code key} with {@code value} in this dictionary. If {@code key} exists in the dictionary before this call, the old value in the dictionary is replaced by {@code value}.

param
key the key to add.
param
value the value to add.
return
the old value previously associated with {@code key} or {@code null} if {@code key} is new to the dictionary.
see
#elements
see
#get
see
#keys
since
Android 1.0

public abstract Vremove(java.lang.Object key)
Removes the key/value pair with the specified {@code key} from this dictionary.

param
key the key to remove.
return
the associated value before the deletion or {@code null} if {@code key} was not known to this dictionary.
see
#get
see
#put
since
Android 1.0

public abstract intsize()
Returns the number of key/value pairs in this dictionary.

return
the number of key/value pairs in this dictionary.
see
#elements
see
#keys
since
Android 1.0