|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.libs.LongKeyTable
Fast, simple hash table for storing references to Objects keyed by an associated 'long' key value. The key value is considered to be a unique identifier for selecting records within the LongKeyTable. In addition, the LongKeyTable class supports a subscribe-listen interface, allowing implementers of the LongKeyTableListener interface to subscribe to receive update notifications for the table.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
LongKeyTable()
Constructor for LongKeyTable: initialize empty table |
Method Summary | |
---|---|
int |
Count()
Return number of objects in table |
void |
EmptyTable()
Empty the table |
java.lang.Object |
FindObject(long id)
Find object, given an object ID |
long[] |
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(long id,
java.lang.Object obj)
Insert new (or updated) record into the hash table |
java.lang.Object |
RemoveObject(long 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 LongKeyTable()
Method Detail |
public void EmptyTable()
public int Count()
public void InsertObject(long id, java.lang.Object obj)
id
- - identifier of object within tableobj
- - object to be added to tablepublic java.lang.Object RemoveObject(long id)
id
- - identifier of object within table
public java.lang.Object FindObject(long id)
id
- - object ID of object to find
public java.util.Enumeration GetKeys()
public long[] 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 |