加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090218034147/http://developer.android.com:80/reference/java/util/Dictionary.html
public abstract class

Dictionary

extends Object
java.lang.Object
   ↳ java.util.Dictionary<K, V>
Known Direct Subclasses
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.

See Also

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

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
See Also

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
See Also

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.

Parameters
key the key to remove
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
See Also