All Packages Class Hierarchy This Package Previous Next Index
Class com.roguewave.tools.v2-0.IdentityDictionary
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----com.roguewave.tools.v2-0.HashDictionary
|
+----com.roguewave.tools.v2-0.IdentityDictionary
- public class IdentityDictionary
- extends HashDictionary
- implements Cloneable, Serializable
-
IdentityDictionary()
- Creates an empty IdentityDictionary
-
IdentityDictionary(int)
- Constructs a new, empty hashtable with the specified initial
capacity.
-
clone()
- Returns a clone of this IdentityDictionary.
-
findKey(Object)
- Searches the IdentityDictionary for a key identical
to the given item.
-
get(Object)
- Find in this IdentityDictionary the key identical
to the given item and return its corresponding value.
-
keys()
- Returns an Enumeration object of the keys
(not the values) in this dictionary, which can be used to visit
each key in turn.
-
put(Object, Object)
- Inserts a key and value association into the IdentityDictionary.
-
remove(Object)
- Removes the key and value pair for which the key is identical to
the given item.
IdentityDictionary
public IdentityDictionary()
- Creates an empty IdentityDictionary
IdentityDictionary
public IdentityDictionary(int initialCapacity)
- Constructs a new, empty hashtable with the specified initial
capacity.
- Parameters:
- initialCapacity - the initial number of buckets
clone
public synchronized Object clone()
- Returns a clone of this IdentityDictionary. Note that
the elements of the dictionary themselves are not cloned.
- Returns:
- The new IdentityDictionary.
- Overrides:
- clone in class HashDictionary
findKey
public synchronized Object findKey(Object key)
- Searches the IdentityDictionary for a key identical
to the given item.
- Parameters:
- key - The item to be tested against the keys
in the collection.
- Returns:
- The matching key if a match is found, null otherwise
- Throws: NullPointerException
- If the specified key is null
- Overrides:
- findKey in class HashDictionary
get
public synchronized Object get(Object key)
- Find in this IdentityDictionary the key identical
to the given item and return its corresponding value.
- Parameters:
- key - The item to be tested against the keys in the collection.
- Returns:
- The value associated with the matched key, or null if no match
- Overrides:
- get in class HashDictionary
keys
public synchronized Enumeration keys()
- Returns an Enumeration object of the keys
(not the values) in this dictionary, which can be used to visit
each key in turn.
- Returns:
- An Enumeration of the keys in this
IdentityDictionary
- Overrides:
- keys in class HashDictionary
put
public synchronized Object put(Object key,
Object value)
- Inserts a key and value association into the IdentityDictionary.
The key and the element cannot be null.
- Parameters:
- key - The item which will be the key of the association
- value - The item which will be the value of the association
- Returns:
- The old value if the key was already in the IdentityDictionary
or null if not
- Throws: NullPointerException
- if the value is null
- Overrides:
- put in class HashDictionary
remove
public synchronized Object remove(Object target)
- Removes the key and value pair for which the key is identical to
the given item.
- Parameters:
- target - The item to be tested against the keys of the collection
- Returns:
- The value to which the key had been mapped in this dictionary,
or null if the key did not have a mapping
- Throws: NullPointerException
- if target is null
- Overrides:
- remove in class HashDictionary
All Packages Class Hierarchy This Package Previous Next Index