Package org.codehaus.groovy.util
Class HashCodeHelper
java.lang.Object
org.codehaus.groovy.util.HashCodeHelper
A utility class to help calculate hashcode values
using an algorithm similar to that outlined in
"Effective Java, Joshua Bloch, 2nd Edition".
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
initHash()
static int
updateHash
(int current, boolean var) static int
updateHash
(int current, boolean[] var) static int
updateHash
(int current, byte[] var) static int
updateHash
(int current, char var) static int
updateHash
(int current, char[] var) static int
updateHash
(int current, double var) static int
updateHash
(int current, double[] var) static int
updateHash
(int current, float var) static int
updateHash
(int current, float[] var) static int
updateHash
(int current, int var) static int
updateHash
(int current, int[] var) static int
updateHash
(int current, long var) static int
updateHash
(int current, long[] var) static int
updateHash
(int current, short[] var) static int
updateHash
(int current, Character var) static int
updateHash
(int current, Double var) static int
updateHash
(int current, Float var) static int
updateHash
(int current, Integer var) static int
updateHash
(int current, Long var) static int
updateHash
(int current, Object var)
-
Constructor Details
-
HashCodeHelper
public HashCodeHelper()
-
-
Method Details
-
initHash
public static int initHash() -
updateHash
public static int updateHash(int current, boolean var) -
updateHash
public static int updateHash(int current, char var) -
updateHash
-
updateHash
public static int updateHash(int current, int var) -
updateHash
-
updateHash
public static int updateHash(int current, long var) -
updateHash
-
updateHash
public static int updateHash(int current, float var) -
updateHash
-
updateHash
public static int updateHash(int current, double var) -
updateHash
-
updateHash
-
updateHash
public static int updateHash(int current, boolean[] var) -
updateHash
public static int updateHash(int current, char[] var) -
updateHash
public static int updateHash(int current, byte[] var) -
updateHash
public static int updateHash(int current, short[] var) -
updateHash
public static int updateHash(int current, int[] var) -
updateHash
public static int updateHash(int current, long[] var) -
updateHash
public static int updateHash(int current, float[] var) -
updateHash
public static int updateHash(int current, double[] var)
-