|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.array.AOSLHashtable
Holds metadata for an array of (possibly unique) string values in a Hashtable, for use in an AOSLookup. See java.util.Hashtable and AOSLookup.
Source code: AOSLHashtable.java
This object wraps around a Hashtable, which is expected to have keys that are the strings from the array, and values which are UniqueStrings, containing metadata about the key string.
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
AOSLHashtable(Hashtable h_ashtable)
Create an AOSLHashtable. |
|
AOSLHashtable(Hashtable h_ashtable,
boolean b_verifyHashtable)
Create an AOSLHashtable. |
Method Summary | |
protected Object |
clone()
Get a full (deep) copy of this AOSLHashtable as an Object. |
boolean |
containsKey(String s_tr)
Is the provided string an existing key in the Hashtable? |
Enumeration |
elements()
Get an Enumeration containing every element in the Hashtable. |
AOSLHashtable |
getAOSLHClone()
Get a full (deep) copy of this AOSLHashtable. |
Hashtable |
getHTClone()
Get a full (deep) clone of the internally held Hashtable. |
PASString |
getPASString()
Get a PASString containing a (newly created) string array of the names in this AOSLookup. |
UniqueString |
getUniqueString(String s_key)
Get the UniqueString object having a certain key. |
Enumeration |
keys()
Get an Enumeration containing every key in the Hashtable. |
int |
size()
How many elements exist in the Hashtable? |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AOSLHashtable(Hashtable h_ashtable)
Create an AOSLHashtable.
Equal to AOSLHashtable(h_ashtable, false)
public AOSLHashtable(Hashtable h_ashtable, boolean b_verifyHashtable)
Create an AOSLHashtable.
h_ashtable
- The hashtable to wrap around. May not be null.b_verifyHashtable
- If true, then h_ashtable is verified to ensure that the keys are a set of unique strings, the values are of type UniqueString, the key and UniqueString.getString are equal, and all the UniqueString.getUnqArrIdx are unique, zero or greater, and that every value between zero and [whatever the maximum value is] exists. If any of these requirements are not met, then an AssertException is thrown. If this parameter is false, then it is assumed that h_ashtable's keys and values are valid. Use false with care.Method Detail |
public boolean containsKey(String s_tr)
Is the provided string an existing key in the Hashtable?
s_tr
- The string to analyze.[h_ashtable].containsKey(s_tr)
Where h_ashtable is exactly as provided to the constructor.public UniqueString getUniqueString(String s_key)
Get the UniqueString object having a certain key.
s_key
- The string value of the key, which points to the desired UniqueString object.((UniqueString)h_ashtable.get(s_key))
Where h_ashtable is exactly as provided to the constructor.public int size()
How many elements exist in the Hashtable?
h_ashtable.size
Where h_ashtable is exactly as provided to the constructor.public Enumeration keys()
Get an Enumeration containing every key in the Hashtable.
h_ashtable.keys
Where h_ashtable is exactly as provided to the constructor.public Enumeration elements()
Get an Enumeration containing every element in the Hashtable.
h_ashtable.elements
Where h_ashtable is exactly as provided to the constructor.public final PASString getPASString()
Get a PASString containing a (newly created) string array of the names in this AOSLookup.
Note the order of the string array is exactly the same as was provided to the constructor.
public final Hashtable getHTClone()
Get a full (deep) clone of the internally held Hashtable.
(new Utility().getOptimizedHT(h_ashtable))
Where h_ashtable is exactly as provided to the constructor.public final AOSLHashtable getAOSLHClone()
Get a full (deep) copy of this AOSLHashtable.
(AOSLHashtable)clone()
protected Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this AOSLHashtable as an Object.
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
http://sourceforge.net/projects/xbnjava