zombie.util.hash
Class DefaultIntHashFunction

java.lang.Object
  extended by zombie.util.hash.DefaultIntHashFunction
All Implemented Interfaces:
java.io.Serializable, IntHashFunction

public class DefaultIntHashFunction
extends java.lang.Object
implements IntHashFunction, java.io.Serializable

This class provides a default hash function for int values. It has been derived from the Java library and is known to work well in the general case.

Since:
1.0
Version:
1.2 2003/5/3
Author:
Søren Bak

Field Summary
static IntHashFunction INSTANCE
          Default instance of this hash function.
 
Method Summary
 int hash(int v)
          Returns a hash code for a specified int value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final IntHashFunction INSTANCE
Default instance of this hash function.

Method Detail

hash

public int hash(int v)
Description copied from interface: IntHashFunction
Returns a hash code for a specified int value.

Specified by:
hash in interface IntHashFunction
Parameters:
v - the value for which to return a hash code.
Returns:
a hash code for the specified value.