|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary
atg.core.util.ArrayDictionary
public class ArrayDictionary
An ArrayDictionary is an implementation of Dictionary that stores its keys and values as arrays. Lookups are performed using a linear search. Adding new elements requires no new object allocations. This is best used for very small key/value mappings that require a Dictionary interface. In addition, this allows null values to be exposed as values, if the ArrayDictionary is created with a pair of arrays. Other Dictionary implementations, such as Hashtable, do not allow null values.
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
| Constructor Summary | |
|---|---|
ArrayDictionary()
Constructs a new ArrayDictionary |
|
ArrayDictionary(java.lang.Object[] pKeys,
java.lang.Object[] pValues)
Constructs a new ArrayDictionary with the given lists of keys and values |
|
| Method Summary | |
|---|---|
void |
clear()
|
java.util.Enumeration |
elements()
|
java.lang.Object |
get(java.lang.Object pKey)
|
boolean |
isEmpty()
|
java.util.Enumeration |
keys()
|
java.lang.Object |
put(java.lang.Object pKey,
java.lang.Object pValue)
|
java.lang.Object |
remove(java.lang.Object pKey)
|
int |
size()
|
java.lang.String |
toString()
Returns a string representation of this hashtable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
| Constructor Detail |
|---|
public ArrayDictionary()
public ArrayDictionary(java.lang.Object[] pKeys,
java.lang.Object[] pValues)
| Method Detail |
|---|
public void clear()
public java.lang.Object put(java.lang.Object pKey,
java.lang.Object pValue)
put in class java.util.Dictionarypublic java.lang.Object get(java.lang.Object pKey)
get in class java.util.Dictionarypublic java.lang.Object remove(java.lang.Object pKey)
remove in class java.util.Dictionarypublic int size()
size in class java.util.Dictionarypublic boolean isEmpty()
isEmpty in class java.util.Dictionarypublic java.util.Enumeration keys()
keys in class java.util.Dictionarypublic java.util.Enumeration elements()
elements in class java.util.Dictionarypublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||