public final class HashCodeHelpers extends Object
Constructor and Description |
---|
HashCodeHelpers() |
Modifier and Type | Method and Description |
---|---|
static int |
hashCode(float... array)
Hash every element uniformly using the Modified Bernstein hash.
|
static int |
hashCode(int... array)
Hash every element uniformly using the Modified Bernstein hash.
|
static <T> int |
hashCodeGeneric(T... array)
Hash every element uniformly using the Modified Bernstein hash.
|
public static int hashCode(int... array)
Useful to implement a Object.hashCode()
for uniformly distributed data.
array
- a non-null
array of integerspublic static int hashCode(float... array)
Useful to implement a Object.hashCode()
for uniformly distributed data.
array
- a non-null
array of floatspublic static <T> int hashCodeGeneric(T... array)
Useful to implement a Object.hashCode()
for uniformly distributed data.
array
- a non-null
array of objects