|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwt.util.Hash
Implementation of an unsynchronized hash table, with one or two keys, using Radke's quadradic residue linear probing instead of buckets to minimize object count (less allocations, faster GC). See C. Radke, Communications of the ACM, 1970, 103-105
Constructor Summary | |
Hash()
|
|
Hash(int initialcapacity,
int loadFactor)
|
Method Summary | |
void |
clear()
empties the table |
java.lang.Object |
get(java.lang.Object k1)
|
java.lang.Object |
get(java.lang.Object k1,
java.lang.Object k2)
|
java.lang.Object[] |
keys()
returns all the primary keys in the table |
void |
put(java.lang.Object k1,
java.lang.Object v)
|
void |
put(java.lang.Object k1,
java.lang.Object k2,
java.lang.Object v)
|
void |
remove(java.lang.Object k1)
|
void |
remove(java.lang.Object k1,
java.lang.Object k2)
|
int |
size()
the number of entries with a non-null value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Hash()
public Hash(int initialcapacity, int loadFactor)
Method Detail |
public int size()
public void clear()
public java.lang.Object[] keys()
public void remove(java.lang.Object k1)
public void remove(java.lang.Object k1, java.lang.Object k2)
public java.lang.Object get(java.lang.Object k1)
public java.lang.Object get(java.lang.Object k1, java.lang.Object k2)
public void put(java.lang.Object k1, java.lang.Object v)
public void put(java.lang.Object k1, java.lang.Object k2, java.lang.Object v)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |