Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.util
Class Dictionary  view Dictionary download Dictionary.java

java.lang.Object
  extended byjava.util.Dictionary
Direct Known Subclasses:
Hashtable

public abstract class Dictionary
extends java.lang.Object

A Dictionary maps keys to values; how it does that is implementation-specific. This is an abstract class which has really gone by the wayside. People at Javasoft are probably embarrassed by it. At this point, it might as well be an interface rather than a class, but it remains this poor, laughable skeleton for the sake of backwards compatibility. At any rate, this was what came before the Map interface in the Collections framework.

Since:
1.0

Constructor Summary
Dictionary()
          Sole constructor (often called implicitly).
 
Method Summary
abstract  Enumeration elements()
          Returns an Enumeration of the values in this Dictionary.
abstract  java.lang.Object get(java.lang.Object key)
          Returns the value associated with the supplied key, or null if no such value exists.
abstract  boolean isEmpty()
          Returns true when there are no elements in this Dictionary.
abstract  Enumeration keys()
          Returns an Enumeration of the keys in this Dictionary
abstract  java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Inserts a new value into this Dictionary, located by the supplied key.
abstract  java.lang.Object remove(java.lang.Object key)
          Removes from the Dictionary the value located by the given key.
abstract  int size()
          Returns the number of values currently in this Dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dictionary

public Dictionary()
Sole constructor (often called implicitly).

Method Detail

elements

public abstract Enumeration elements()
Returns an Enumeration of the values in this Dictionary.


get

public abstract java.lang.Object get(java.lang.Object key)
Returns the value associated with the supplied key, or null if no such value exists. Since Dictionaries are not allowed null keys or elements, a null result always means the key is not present.


isEmpty

public abstract boolean isEmpty()
Returns true when there are no elements in this Dictionary.


keys

public abstract Enumeration keys()
Returns an Enumeration of the keys in this Dictionary


put

public abstract java.lang.Object put(java.lang.Object key,
                                     java.lang.Object value)
Inserts a new value into this Dictionary, located by the supplied key. Dictionary does not support null keys or values, so a null return can safely be interpreted as adding a new key.


remove

public abstract java.lang.Object remove(java.lang.Object key)
Removes from the Dictionary the value located by the given key. A null return safely means that the key was not mapped in the Dictionary.


size

public abstract int size()
Returns the number of values currently in this Dictionary.