|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.knowledgeplaza.util.HashCodeUtil
public class HashCodeUtil
Copied from http://www.javapractices.com/topic/TopicAction.do?Id=28
| Field Summary | |
|---|---|
static int |
SEED
An initial value for a hashCode, to which is added contributions from fields. |
| Constructor Summary | |
|---|---|
HashCodeUtil()
|
|
| Method Summary | |
|---|---|
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. |
| 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
hashCode, to which is added contributions from fields. Using a non-zero value decreases collisons of hashCode values.
| Constructor Detail |
|---|
public HashCodeUtil()
| Method Detail |
|---|
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)
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||