|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.misc.HashCodeUtilities
public final class HashCodeUtilities
Collected methods which allow easy implementation of hashCode
.
Example use case:
public int hashCode() { int result = HashCodeUtil.hash(someField); result = HashCodeUtil.hash(result, fPrimitive); result = HashCodeUtil.hash(result, fObject); result = HashCodeUtil.hash(result, fArray); return result; }
Constructor Summary | |
---|---|
HashCodeUtilities()
|
Method Summary | |
---|---|
static int |
hash(boolean value)
|
static int |
hash(char value)
|
static int |
hash(double value)
|
static int |
hash(float value)
|
static int |
hash(int value)
|
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 seed,
java.lang.Object object)
aObject is a possibly-null object field, and possibly an
array. |
static int |
hash(long value)
|
static int |
hash(java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashCodeUtilities()
Method Detail |
---|
public static int hash(int aSeed, boolean aBoolean)
public static int hash(boolean value)
public static int hash(int aSeed, char aChar)
public static int hash(char value)
public static int hash(int aSeed, int aInt)
public static int hash(int value)
public static int hash(int aSeed, long aLong)
public static int hash(long value)
public static int hash(int aSeed, float aFloat)
public static int hash(float value)
public static int hash(int aSeed, double aDouble)
public static int hash(double value)
public static int hash(int seed, java.lang.Object object)
aObject
is a possibly-null object field, and possibly an
array.
If aObject
is an array, then each element may be a primitive
or a possibly-null object.
public static int hash(java.lang.Object value)
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |