|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.util.HashcodeMaker
Methods which allow easy implementation of hashcode. This was inspired from recommendations in the book Effective Java , by Joshua Bloch.
| Field Summary | |
static int |
SEED
Deprecated. An initial value for a hashCode, to which is added contributions from fields. |
| Constructor Summary | |
HashcodeMaker()
Deprecated. |
|
| Method Summary | |
static int |
hash(int aSeed,
boolean aBoolean)
Deprecated. booleans. |
static int |
hash(int aSeed,
boolean[] aArray)
Deprecated. Arrays of booleans. |
static int |
hash(int aSeed,
byte[] aArray)
Deprecated. Arrays of bytes. |
static int |
hash(int aSeed,
char aChar)
Deprecated. chars. |
static int |
hash(int aSeed,
char[] aArray)
Deprecated. Arrays of chars. |
static int |
hash(int aSeed,
double aDouble)
Deprecated. doubles. |
static int |
hash(int aSeed,
double[] aArray)
Deprecated. Arrays of doubles. |
static int |
hash(int aSeed,
float aFloat)
Deprecated. floats. |
static int |
hash(int aSeed,
float[] aArray)
Deprecated. Arrays of floats. |
static int |
hash(int aSeed,
int aInt)
Deprecated. integers. |
static int |
hash(int aSeed,
int[] aArray)
Deprecated. Arrays of integers. |
static int |
hash(int aSeed,
long aLong)
Deprecated. longs. |
static int |
hash(int aSeed,
long[] aArray)
Deprecated. Arrays of longs |
static int |
hash(int aSeed,
Object aObject)
Deprecated. Possibly-null Object fields. |
static int |
hash(int aSeed,
Object[] aArray)
Deprecated. Arrays of Objects. |
static int |
hash(int aSeed,
short[] aArray)
Deprecated. Arrays of shorts. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SEED
| Constructor Detail |
public HashcodeMaker()
| Method Detail |
public static int hash(int aSeed,
boolean aBoolean)
aSeed - seed numberaBoolean - boolean value
public static int hash(int aSeed,
char aChar)
aSeed - seed numberaChar - char value
public static int hash(int aSeed,
int aInt)
aSeed - seed numberaInt - int value
public static int hash(int aSeed,
long aLong)
aSeed - seed numberaLong - long value
public static int hash(int aSeed,
float aFloat)
aSeed - seed numberaFloat - float value
public static int hash(int aSeed,
double aDouble)
aSeed - seed numberaDouble - double value
public static int hash(int aSeed,
Object aObject)
aSeed - seed numberaObject - object to hash.
public static int hash(int aSeed,
Object[] aArray)
aSeed - seed numberaArray - array to hash
public static int hash(int aSeed,
boolean[] aArray)
aSeed - seed numberaArray - boolean array to hash
public static int hash(int aSeed,
char[] aArray)
aSeed - seed numberaArray - char array to hash
public static int hash(int aSeed,
byte[] aArray)
aSeed - seed numberaArray - byte array to hash
public static int hash(int aSeed,
short[] aArray)
aSeed - seed numberaArray - short array to hash
public static int hash(int aSeed,
int[] aArray)
aSeed - seed numberaArray - int array to hash
public static int hash(int aSeed,
long[] aArray)
aSeed - seed numberaArray - long array to hash
public static int hash(int aSeed,
float[] aArray)
aSeed - seed numberaArray - float array to hash
public static int hash(int aSeed,
double[] aArray)
aSeed - seed numberaArray - double array to hash
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||