Package: org.codehaus.groovy.util

## [Java] Class HashCodeHelper

- org.codehaus.groovy.util.HashCodeHelper

-     @GroovyABI(since = "1.6.0")
      public class HashCodeHelper
      extends Object

  A utility class to help calculate hashcode values using an algorithm similar to that outlined in "Effective Java, Joshua Bloch, 2nd Edition".

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static int` | `initHash()` Returns the initial seed for a hash-code calculation sequence.
    `` | `public static int` | `updateHash(int current, boolean var)` Mixes a boolean value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, char var)` Mixes a character value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, Character var)` Mixes a boxed character value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, int var)` Mixes an integer value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, Integer var)` Mixes a boxed integer value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, long var)` Mixes a long value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, Long var)` Mixes a boxed long value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, float var)` Mixes a float value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, Float var)` Mixes a boxed float value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, double var)` Mixes a double value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, Double var)` Mixes a boxed double value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, Object var)` Mixes an object or object-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, boolean[] var)` Mixes a boolean-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, char[] var)` Mixes a char-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, byte[] var)` Mixes a byte-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, short[] var)` Mixes a short-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, int[] var)` Mixes an int-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, long[] var)` Mixes a long-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, float[] var)` Mixes a float-array value into an in-progress hash code.
    `` | `public static int` | `updateHash(int current, double[] var)` Mixes a double-array value into an in-progress hash code.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public static int initHash()

      Returns the initial seed for a hash-code calculation sequence.

      Returns:
        the starting hash value

    - #### public static int updateHash(int current, boolean var)

      Mixes a boolean value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, char var)

      Mixes a character value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, Character var)

      Mixes a boxed character value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, int var)

      Mixes an integer value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, Integer var)

      Mixes a boxed integer value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, long var)

      Mixes a long value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, Long var)

      Mixes a boxed long value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, float var)

      Mixes a float value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, Float var)

      Mixes a boxed float value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, double var)

      Mixes a double value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, Double var)

      Mixes a boxed double value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, Object var)

      Mixes an object or object-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, boolean[] var)

      Mixes a boolean-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, char[] var)

      Mixes a char-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, byte[] var)

      Mixes a byte-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, short[] var)

      Mixes a short-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, int[] var)

      Mixes an int-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, long[] var)

      Mixes a long-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, float[] var)

      Mixes a float-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value

    - #### public static int updateHash(int current, double[] var)

      Mixes a double-array value into an in-progress hash code.

      Parameters:
        `current` - the current hash value
        `var` - the value to mix in
      Returns:
        the updated hash value