|
GNU Trove | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnu.trove.HashFunctions
Provides various hash functions.
Constructor Summary | |
HashFunctions()
|
Method Summary | |
static int |
hash(double value)
Returns a hashcode for the specified value. |
static int |
hash(float value)
Returns a hashcode for the specified value. |
static int |
hash(int value)
Returns a hashcode for the specified value. |
static int |
hash(long value)
Returns a hashcode for the specified value. |
static int |
hash(java.lang.Object object)
Returns a hashcode for the specified object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HashFunctions()
Method Detail |
public static final int hash(double value)
public static final int hash(float value)
public static final int hash(int value)
using31^5*(d[0]*31^(n-1) + d[1]*31^(n-2) + ... + d[n-1])
int
arithmetic, where d[i]
is
the ith digit of the value, counting from the right,
n
is the number of decimal digits of the specified
value, and ^
indicates exponentiation. (The hash
value of the value zero is zero.)
public static final int hash(long value)
public static final int hash(java.lang.Object object)
|
GNU Trove | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |