THE PACKAGE JAVA.UTIL
java.util.Dictionary
21.4
21.4 The Class
java.util.Dictionary
A
Dictionary
 is an object that associates
elements
 with
keys
. Every key and
every element is an object. In any one
Dictionary
, every key is associated at
most one element. Given a
Dictionary
 and a key, the associated element can be
looked up.
public abstract class Dictionary {
abstract public int size();
abstract public boolean isEmpty();
abstract public Object get(Object key)
throws NullPointerException;
abstract public Object put(Object key, Object element)
throws NullPointerException;
abstract public Object remove(Object key)
throws NullPointerException;
abstract public Enumeration keys();
abstract public Enumeration elements();
}
As a rule, the
equals
 method ( 20.1.3) should be used by implementations of
the class
Dictionary
 to decide whether two keys are the same.
21.4.1
abstract public int size()
The general contract for the
size
 method is that it returns the number of entries
(distinct keys) in this dictionary.
21.4.2
abstract public boolean isEmpty()
The general contract for the
isEmpty
 method is that the result is
true
 if and only
if this dictionary contains no entries.
21.4.3
abstract public Object get(Object key)
throws NullPointerException
The general contract for the
isEmpty
 method is that if this dictionary contains an
entry for the specified
key
, the associated element is returned; otherwise,
null
 is
returned.
If the
key
 is
null
, a
NullPointerException
 is thrown.
633






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved