public class HashCode
extends java.lang.Object
hashCode
.
Example:
override def hashCode: Int = { var result = HashCode.SEED //collect the contributions of various fields result = HashCode.hash(result, fPrimitive) result = HashCode.hash(result, fObject) result = HashCode.hash(result, fArray) result }
Constructor and Description |
---|
HashCode() |
Modifier and Type | Method and Description |
---|---|
static int |
hash(int seed,
boolean value) |
static int |
hash(int seed,
char value) |
static int |
hash(int seed,
double value) |
static int |
hash(int seed,
float value) |
static int |
hash(int seed,
int value) |
static int |
hash(int seed,
long value) |
static int |
hash(int seed,
java.lang.Object any) |
static int |
SEED() |
public static int SEED()
public static int hash(int seed, java.lang.Object any)
public static int hash(int seed, boolean value)
public static int hash(int seed, char value)
public static int hash(int seed, int value)
public static int hash(int seed, long value)
public static int hash(int seed, float value)
public static int hash(int seed, double value)