Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

java::util::Dictionary Class Reference

The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values. More...

#include <java_util_Dictionary.h>

Inheritance diagram for java::util::Dictionary:

Inheritance graph
[legend]
Collaboration diagram for java::util::Dictionary:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::java::util::Dictionary
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::java::util::Dictionary > > 
array2D

Public Member Functions

 Dictionary (::xmog_dummy _use_java_ctor,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sole constructor.
virtual ::java::util::Enumeration elements (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns an enumeration of the values in this dictionary.
virtual ::java::lang::Object get (const ::java::lang::Object &key,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value to which the key is mapped in this dictionary.
virtual bool isEmpty (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Tests if this dictionary maps no keys to value.
virtual ::java::util::Enumeration keys (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns an enumeration of the keys in this dictionary.
virtual ::java::lang::Object put (const ::java::lang::Object &key, const ::java::lang::Object &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Maps the specified key to the specified value in this dictionary.
virtual ::java::lang::Object remove (const ::java::lang::Object &key,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Removes the key (and its corresponding value) from this dictionary.
virtual jint size (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the number of entries (dinstint keys) in this dictionary.

Detailed Description

The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.

Every key and every value is an object. In any one Dictionary object, every key is associated with at most one value. Given a Dictionary and a key, the associated element can be looked up. Any non-null object can be used as a key and as a value.

As a rule, the equals method should be used by implementations of this class to decide if two keys are the same.

NOTE: This class is obsolete. New implementations should implement the Map interface, rather than extending this class.

Author:
unascribed


Constructor & Destructor Documentation

java::util::Dictionary::Dictionary ::xmog_dummy  _use_java_ctor,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Sole constructor.

(For invocation by subclass constructors, typically implicit.)

Parameters:
_use_java_ctor indicates that you want to delegate to a Java constructor whose natural proxy conflicts with a C++ requirement.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.


Member Function Documentation

virtual ::java::util::Enumeration java::util::Dictionary::elements ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Returns an enumeration of the values in this dictionary.

The general contract for the elements method is that an Enumeration is returned that will generate all the elements contained in entries in this dictionary.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
an enumeration of the values in this dictionary.

Reimplemented in java::util::Hashtable.

virtual ::java::lang::Object java::util::Dictionary::get const ::java::lang::Object key,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Returns the value to which the key is mapped in this dictionary.

The general contract for the isEmpty method is that if this dictionary contains an entry for the specified key, the associated value is returned; otherwise, null is returned.

Parameters:
key a key in this dictionary. null if the key is not mapped to any value in this dictionary.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value to which the key is mapped in this dictionary;

Reimplemented in java::util::Hashtable.

virtual bool java::util::Dictionary::isEmpty ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Tests if this dictionary maps no keys to value.

The general contract for the isEmpty method is that the result is true if and only if this dictionary contains no entries.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
true if this dictionary maps no keys to values; false otherwise.

Reimplemented in java::util::Hashtable.

virtual ::java::util::Enumeration java::util::Dictionary::keys ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Returns an enumeration of the keys in this dictionary.

The general contract for the keys method is that an Enumeration object is returned that will generate all the keys for which this dictionary contains entries.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
an enumeration of the keys in this dictionary.

Reimplemented in java::util::Hashtable.

virtual ::java::lang::Object java::util::Dictionary::put const ::java::lang::Object key,
const ::java::lang::Object value,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Maps the specified key to the specified value in this dictionary.

Neither the key nor the value can be null.

If this dictionary already contains an entry for the specified key, the value already in this dictionary for that key is returned, after modifying the entry to contain the new element.

If this dictionary does not already have an entry for the specified key, an entry is created for the specified key and value, and null is returned.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
key the hashtable key.
value the value.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the previous value to which the key was mapped in this dictionary, or null if the key did not have a previous mapping.

Reimplemented in java::util::Hashtable.

virtual ::java::lang::Object java::util::Dictionary::remove const ::java::lang::Object key,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Removes the key (and its corresponding value) from this dictionary.

This method does nothing if the key is not in this dictionary.

Parameters:
key the key that needs to be removed.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value to which the key had been mapped in this dictionary, or null if the key did not have a mapping.

Reimplemented in java::util::Hashtable.

virtual jint java::util::Dictionary::size ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Returns the number of entries (dinstint keys) in this dictionary.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the number of keys in this dictionary.

Reimplemented in java::util::Hashtable.


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:41 2006 for JMS Courier for C++ by  doxygen 1.4.1