public class SimpleChainHashFunction<E> extends java.lang.Object implements ChainHashFunction<E>
Constructor and Description |
---|
SimpleChainHashFunction(int T)
Provides a hash function for a hash table with chaining, for a given table
size
|
Modifier and Type | Method and Description |
---|---|
int |
hashValue(E e)
Reports the hash value for a given value
|
public SimpleChainHashFunction(int T) throws java.lang.IllegalArgumentException
T
- table sizejava.lang.IllegalArgumentException
- if the input table size is not positive
public int hashValue(E e)
ChainHashFunction
hashValue
in interface ChainHashFunction<E>
e
- the element whose has value is to be provided