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".
| 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. |
Returns the initial seed for a hash-code calculation sequence.
Mixes a boolean value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a character value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a boxed character value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes an integer value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a boxed integer value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a long value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a boxed long value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a float value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a boxed float value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a double value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a boxed double value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes an object or object-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a boolean-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a char-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a byte-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a short-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes an int-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a long-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a float-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix inMixes a double-array value into an in-progress hash code.
current - the current hash valuevar - the value to mix in