Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


com.tangosol.util
Class HashHelper

java.lang.Object
  extended by com.tangosol.util.HashHelper


public abstract class HashHelper
extends java.lang.Object

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
HashHelper()
           

 

Method Summary
static int hash(boolean[] value, int hash)
          Calculate a running hash using the boolean array value.
static int hash(boolean value, int hash)
          Calculate a running hash using the boolean value.
static int hash(byte[] value, int hash)
          Calculate a running hash using the byte array value.
static int hash(byte value, int hash)
          Calculate a running hash using the byte value.
static int hash(char[] value, int hash)
          Calculate a running hash using the char array value.
static int hash(char value, int hash)
          Calculate a running hash using the char value.
static int hash(java.util.Collection col, int hash)
          Calculate a running hash using the Collection value.
static int hash(double[] value, int hash)
          Calculate a running hash using the double array value.
static int hash(double value, int hash)
          Calculate a running hash using the double value.
static int hash(float[] value, int hash)
          Calculate a running hash using the float array value.
static int hash(float value, int hash)
          Calculate a running hash using the float value.
static int hash(int[] value, int hash)
          Calculate a running hash using the int array value.
static int hash(int value, int hash)
          Calculate a running hash using the int value.
static int hash(long[] value, int hash)
          Calculate a running hash using the long array value.
static int hash(long value, int hash)
          Calculate a running hash using the long value.
static int hash(java.lang.Object[] value, int hash)
          Calculate a running hash using the Object array value.
static int hash(java.lang.Object value, int hash)
          Calculate a running hash using the Object value.
static int hash(short[] value, int hash)
          Calculate a running hash using the short array value.
static int hash(short value, int hash)
          Calculate a running hash using the short value.
static java.lang.String hash(java.lang.String s)
          Shift the value into a different charset order.

 

Constructor Detail

HashHelper

public HashHelper()

Method Detail

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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - the running hash value
Returns:
the resulting running hash value

hash

public static int hash(java.lang.Object value,
                       int hash)
Calculate a running hash using the Object value.
Parameters:
value - the Object value for use in the hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - 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 hash
hash - the running hash value
Returns:
the resulting running hash value

hash

public static int hash(java.lang.Object[] value,
                       int hash)
Calculate a running hash using the Object array value.
Parameters:
value - the Object array value for use in the hash
hash - the running hash value
Returns:
the resulting running hash value

hash

public static int hash(java.util.Collection col,
                       int hash)
Calculate a running hash using the Collection value. The hash computed over the Collection's entries is order-independent.
Parameters:
value - the Collection value for use in the hash
hash - the running hash value
Returns:
the resulting running hash value

hash

public static java.lang.String hash(java.lang.String s)
Shift the value into a different charset order.
Parameters:
s - a String
Returns:
a String with a different charset ordering

Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


Copyright © 2000, 2009, Oracle. All rights reserved.