public final class HashCodeUtil
extends java.lang.Object
public int hashCode(){ int result = HashCodeUtil.SEED; //collect the contributions of various fields result = HashCodeUtil.hash(result, fPrimitive); result = HashCodeUtil.hash(result, fObject); result = HashCodeUtil.hash(result, fArray); return result; }
Modifier and Type | Field and Description |
---|---|
static int |
SEED
All static.
|
Constructor and Description |
---|
HashCodeUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
hash(int aSeed,
boolean aBoolean)
booleans.
|
static int |
hash(int aSeed,
char aChar)
chars.
|
static int |
hash(int aSeed,
double aDouble)
doubles.
|
static int |
hash(int aSeed,
float aFloat)
floats.
|
static int |
hash(int aSeed,
int aInt)
ints.
|
static int |
hash(int aSeed,
long aLong)
longs.
|
static int |
hash(int aSeed,
java.lang.Object aObject)
aObject is a possibly-null object field, and possibly an array.
|
public static final int SEED
public static int hash(int aSeed, boolean aBoolean)
public static int hash(int aSeed, char aChar)
public static int hash(int aSeed, int aInt)
public static int hash(int aSeed, long aLong)
public static int hash(int aSeed, float aFloat)
public static int hash(int aSeed, double aDouble)
public static int hash(int aSeed, java.lang.Object aObject)