com.lmonson.hash
Class PseudoRandomHashFunction
java.lang.Object
com.lmonson.hash.PseudoRandomHashFunction
- All Implemented Interfaces:
- HashFunction
public class PseudoRandomHashFunction
- extends java.lang.Object
- implements HashFunction
An implementation of HashFunction that uses a pseudo-random
number generator for generating hashes. This implementation remains
deterministic by using the hashValue() method of an object to
seed the random number generator.
|
Method Summary |
int |
hash(java.lang.Object objectToHash,
int maxBits)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PseudoRandomHashFunction
public PseudoRandomHashFunction(int numberOfRounds)
PseudoRandomHashFunction
public PseudoRandomHashFunction()
hash
public int hash(java.lang.Object objectToHash,
int maxBits)
- Specified by:
hash in interface HashFunction