Package zombie.util.hash
Class DefaultIntHashFunction
java.lang.Object
zombie.util.hash.DefaultIntHashFunction
- All Implemented Interfaces:
Serializable
,IntHashFunction
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IntHashFunction
Default instance of this hash function. -
Method Summary
-
Field Details
-
INSTANCE
Default instance of this hash function.
-
-
Method Details
-
hash
public int hash(int v) Description copied from interface:IntHashFunction
Returns a hash code for a specified int value.- Specified by:
hash
in interfaceIntHashFunction
- Parameters:
v
- the value for which to return a hash code.- Returns:
- a hash code for the specified value.
-