serf.utils
Class HashMix

java.lang.Object
  extended by serf.utils.HashMix

public class HashMix
extends java.lang.Object


Constructor Summary
HashMix()
           
 
Method Summary
static int mix(int key)
          Mix the bits around in an integer to make them more "random".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMix

public HashMix()
Method Detail

mix

public static int mix(int key)
Mix the bits around in an integer to make them more "random". This function comes from Thomas Wang: http://www.concentric.net/~Ttwang/tech/inthash.htm

Parameters:
key -
Returns: