|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--com.ibm.dse.applsrv.aa.IntegerKeyDictionary
This class implements a dictionary which is keyed by integers.
Constructor Summary | |
IntegerKeyDictionary()
|
|
IntegerKeyDictionary(int initialCapacity)
|
Method Summary | |
void |
add(int key,
java.lang.Object value)
Maps the specified key to the specified value in this dictionary. |
void |
addAll(java.util.Hashtable d)
Add all of the entries in the argument hash table to the current dictionary. |
void |
addAll(IntegerKeyDictionary d)
Add all of the entries in the argument dictionary to the current dictionary. |
Dictionary |
asDictionary()
Return a regular dictionary corresponding to this dictionary but using Integer keys rather than int keys. |
void |
clear()
Clears this dictionary so that it contains no elements. |
java.lang.Object |
clone()
Creates a shallow copy of this dictionary. |
boolean |
contains(java.lang.Object value)
Tests if this dictionary contains the specified value. |
boolean |
containsKey(int key)
Tests if the specified integer is a key in this dictionary. |
IntegerKeyDictionary |
copy()
Creates a shallow copy of this dictionary. |
static IntegerKeyDictionary |
copy(IntegerKeyDictionary aDictionary)
Return a copy of the specified dictionary or null if the argument is null. |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this dictionary. |
java.util.Enumeration |
enum()
Returns an enumeration of the values in this dictionary. |
java.lang.Object |
get(int key)
Return the value associated with the integer key. |
java.lang.Object |
get(java.lang.Object key)
Return the value associated with the integer key. |
boolean |
isEmpty()
Tests if this dictionary is empty. |
java.util.Enumeration |
keys()
Returns an integer key enumeration of the keys in this dictionary. |
int[] |
keysAsArray()
Returns an array containing all the keys of this dictionary. |
java.lang.Object |
put(int key,
java.lang.Object value)
Maps the specified key to the specified value in this dictionary. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this dictionary. |
java.lang.Object |
remove(int key)
Remove the key and its associated value from this dictionary. |
java.lang.Object |
remove(java.lang.Object key)
Remove the key and its associated value from this dictionary. |
int |
size()
Returns the number of entries in this dictionary. |
java.lang.String |
toString()
Return the string representation of this dictionary. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public IntegerKeyDictionary()
public IntegerKeyDictionary(int initialCapacity)
initialCapacity
- int - the initial capacity of this dictionary.Method Detail |
public void add(int key, java.lang.Object value)
key
to the specified value
in this dictionary. The value can't be null
.key
- int - the key.value
- Object - the value.null
.public void addAll(IntegerKeyDictionary d)
d
- IntegerKeyDictionary - the dictionary to load.public void addAll(java.util.Hashtable d)
d
- Hashtable - the hash table to load.public Dictionary asDictionary()
public void clear()
public java.lang.Object clone()
public boolean contains(java.lang.Object value)
containsKey
method.value
- Object - the value to search for.true
if value
was found else returns false
.null
.public boolean containsKey(int key)
key
- int - the key to search for.true
if the key was found in this dictionary else false
.public IntegerKeyDictionary copy()
public static IntegerKeyDictionary copy(IntegerKeyDictionary aDictionary)
aDictionary
- IntegerKeyDictionary - the dictionary to copy or null.public java.util.Enumeration elements()
public java.util.Enumeration enum()
public java.lang.Object get(int key)
key
- int - the key.null
if there is no value associated with the key.public java.lang.Object get(java.lang.Object key)
key
- Object - the key.null
if there is no value associated with the key.public boolean isEmpty()
true
if this dictionary is empty else false
.public java.util.Enumeration keys()
public int[] keysAsArray()
public java.lang.Object put(int key, java.lang.Object value)
key
to the specified value
in this dictionary. The value can't be null
.key
- int - the key.value
- Object - the value.null
if it did not have one.null
.public java.lang.Object put(java.lang.Object key, java.lang.Object value)
key
to the specified value
in this dictionary. The value can't be null
.key
- Object - the key.value
- Object - the value.null
if it did not have one.null
.public java.lang.Object remove(int key)
key
- int - the key to be removed.null
if it did not have one.public java.lang.Object remove(java.lang.Object key)
key
- Object - the key to be removed.null
if it did not have one.public int size()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |