Class DefaultIntHashFunction

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

public class DefaultIntHashFunction extends Object implements IntHashFunction, 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
  • Field Details

    • INSTANCE

      public static final IntHashFunction 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 interface IntHashFunction
      Parameters:
      v - the value for which to return a hash code.
      Returns:
      a hash code for the specified value.