|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.libs.ShortKeyTable
Fast, simple hash table for storing references to Objects keyed by an associated 'short' key value. The key value is considered to be a unique identifier for selecting records within the ShortKeyTable. In addition, the ShortKeyTable class supports a subscribe-listen interface, allowing implementers of the ShortKeyTableListener interface to subscribe to receive update notifications for the table.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
ShortKeyTable()
Constructor for ShortKeyTable: initialize empty table |
Method Summary | |
---|---|
int |
Count()
Return number of objects in table |
void |
EmptyTable()
Empty the table |
java.lang.Object |
FindObject(short id)
Find object, given an object ID |
short[] |
GetAllKeys()
Get array of all keys in table. |
java.lang.Object[] |
GetAllObjects()
Get array of all objects in table. |
java.util.Enumeration |
GetKeys()
Enumerate all keys in table. |
java.util.Enumeration |
GetObjects()
Enumerate all objects in table. |
void |
InsertObject(short id,
java.lang.Object obj)
Insert new (or updated) record into the hash table |
java.lang.Object |
RemoveObject(short id)
Remove object with given ID from table (if present) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long serialVersionUID
Constructor Detail |
public ShortKeyTable()
Method Detail |
public void EmptyTable()
public int Count()
public void InsertObject(short id, java.lang.Object obj)
id
- - identifier of object within tableobj
- - object to be added to tablepublic java.lang.Object RemoveObject(short id)
id
- - identifier of object within table
public java.lang.Object FindObject(short id)
id
- - object ID of object to find
public java.util.Enumeration GetKeys()
public short[] GetAllKeys()
public java.util.Enumeration GetObjects()
public java.lang.Object[] GetAllObjects()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |