|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.util.HashCode
public final class HashCode
The class can be used to easily implement Object.hashCode().
| Constructor Summary | |
|---|---|
HashCode()
|
|
| Method Summary | |
|---|---|
void |
hash(boolean aBoolean)
Updates the internal hash code with the given Boolean. |
void |
hash(char aChar)
Updates the internal hash code with the given character. |
void |
hash(double aDouble)
Updates the internal hash code with the given double. |
void |
hash(float aFloat)
Updates the internal hash code with the given float. |
void |
hash(int aInt)
Updates the internal hash code with the given integer. |
void |
hash(long aLong)
Updates the internal hash code with the given long. |
void |
hash(Object aObject)
Updates the internal hash code with the given object. |
int |
toInt()
Returns the current snapshot of the hash code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashCode()
| Method Detail |
|---|
public void hash(boolean aBoolean)
aBoolean - the Boolean to add to the hash code.public void hash(char aChar)
aChar - the character to add to the hash code.public void hash(double aDouble)
aDouble - the double to add to the hash code.public void hash(float aFloat)
aFloat - the float to add to the hash code.public void hash(int aInt)
aInt - the integer to add to the hash code.public void hash(long aLong)
aLong - the long to add to the hash code.public void hash(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.
aObject - the object to add to the hash code.public int toInt()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||