com.lmonson.hash
Class PseudoRandomHashFunction

java.lang.Object
  extended by 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.


Constructor Summary
PseudoRandomHashFunction()
           
PseudoRandomHashFunction(int numberOfRounds)
           
 
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
 

Constructor Detail

PseudoRandomHashFunction

public PseudoRandomHashFunction(int numberOfRounds)

PseudoRandomHashFunction

public PseudoRandomHashFunction()
Method Detail

hash

public int hash(java.lang.Object objectToHash,
                int maxBits)
Specified by:
hash in interface HashFunction