Package com.tangosol.util
Class HashHelper
java.lang.Object
com.tangosol.util.HashHelper
This abstract class contains helper functions for
calculating hash code values for any group of
java intrinsics.
- Version:
- 1.00, 04/25/00
- Author:
- pm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic inthash(boolean[] value, int hash) Calculate a running hash using the boolean array value.static inthash(boolean value, int hash) Calculate a running hash using the boolean value.static inthash(byte[] value, int hash) Calculate a running hash using the byte array value.static inthash(byte value, int hash) Calculate a running hash using the byte value.static inthash(char[] value, int hash) Calculate a running hash using the char array value.static inthash(char value, int hash) Calculate a running hash using the char value.static inthash(double[] value, int hash) Calculate a running hash using the double array value.static inthash(double value, int hash) Calculate a running hash using the double value.static inthash(float[] value, int hash) Calculate a running hash using the float array value.static inthash(float value, int hash) Calculate a running hash using the float value.static inthash(int[] value, int hash) Calculate a running hash using the int array value.static inthash(int value, int hash) Calculate a running hash using the int value.static inthash(long[] value, int hash) Calculate a running hash using the long array value.static inthash(long value, int hash) Calculate a running hash using the long value.static inthash(short[] value, int hash) Calculate a running hash using the short array value.static inthash(short value, int hash) Calculate a running hash using the short value.static intCalculate a running hash using the Object array value.static intCalculate a running hash using the Object value.static StringShift the value into a different charset order.static inthash(Collection col, int hash) Calculate a running hash using the Collection value.
-
Constructor Details
-
HashHelper
public HashHelper()
-
-
Method Details
-
hash
public static int hash(boolean value, int hash) Calculate a running hash using the boolean value.- Parameters:
value- the boolean value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(byte value, int hash) Calculate a running hash using the byte value.- Parameters:
value- the byte value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(char value, int hash) Calculate a running hash using the char value.- Parameters:
value- the char value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(double value, int hash) Calculate a running hash using the double value.- Parameters:
value- the double value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(float value, int hash) Calculate a running hash using the float value.- Parameters:
value- the float value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(int value, int hash) Calculate a running hash using the int value.- Parameters:
value- the int value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(long value, int hash) Calculate a running hash using the long value.- Parameters:
value- the long value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(short value, int hash) Calculate a running hash using the short value.- Parameters:
value- the short value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
Calculate a running hash using the Object value.- Parameters:
value- the Object value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(boolean[] value, int hash) Calculate a running hash using the boolean array value.- Parameters:
value- the boolean array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(byte[] value, int hash) Calculate a running hash using the byte array value.- Parameters:
value- the byte array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(char[] value, int hash) Calculate a running hash using the char array value.- Parameters:
value- the char array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(double[] value, int hash) Calculate a running hash using the double array value.- Parameters:
value- the double array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(float[] value, int hash) Calculate a running hash using the float array value.- Parameters:
value- the float array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(int[] value, int hash) Calculate a running hash using the int array value.- Parameters:
value- the int array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(long[] value, int hash) Calculate a running hash using the long array value.- Parameters:
value- the long array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
public static int hash(short[] value, int hash) Calculate a running hash using the short array value.- Parameters:
value- the short array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
Calculate a running hash using the Object array value.- Parameters:
value- the Object array value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
Calculate a running hash using the Collection value. The hash computed over the Collection's entries is order-independent.- Parameters:
col- the Collection value for use in the hashhash- the running hash value- Returns:
- the resulting running hash value
-
hash
Shift the value into a different charset order.- Parameters:
s- a String- Returns:
- a String with a different charset ordering
-