Package cpsc331.collections
Interface ChainHashFunction<E>
-
- All Known Implementing Classes:
SimpleChainHashFunction
public interface ChainHashFunction<E>
Provides an interface for a hash function that can be used by a hash table with chaining.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
hashValue(E e)
Reports the hash value for a given value
-
-
-
Method Detail
-
hashValue
int hashValue(E e)
Reports the hash value for a given value- Parameters:
e
- the element whose has value is to be provided- Returns:
- the hash value for this element
Precondition:
- An element e of type E has been given as input.
- The has value of e — an integer between zero and one less than the size of the supported has table — is returned as output.
-
-