|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface HashTableEntry defines the getKey and hash methods that an entry in a HashTable must implement.
Method Summary | |
java.lang.Object |
getKey()
Return the key used to enter, lookup, and delete from a hash table. |
int |
hash(java.lang.Object key,
int tableSize)
Compute the hash index for the given key modulo the given table size. |
Method Detail |
public java.lang.Object getKey()
Implementors of this method return the value of the data field that is used as the unique key for the entry.
public int hash(java.lang.Object key, int tableSize)
Implementors of this method return a suitable hash key for the entry. It is the implementor's responsibility to ensure adequate table coverage by the set of values returned from this method.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |