public abstract class HashCodeBuilder extends Object
object class.
Example for calculating the hash code for a given class:
@Override
public int hashCode() {
return object.hashCodeOf(getClass())
.and(_prop1)
.and(_prop2).value();
}object.hashCodeOf(Class)| Modifier and Type | Method and Description |
|---|---|
abstract HashCodeBuilder |
and(boolean value)
Add hash code for a
boolean. |
abstract HashCodeBuilder |
and(boolean[] values)
Add hash code for an
boolean array. |
abstract HashCodeBuilder |
and(byte value)
Add hash code for a
byte. |
abstract HashCodeBuilder |
and(byte[] values)
Add hash code for an
byte arrays. |
abstract HashCodeBuilder |
and(char value)
Add hash code for a
char. |
abstract HashCodeBuilder |
and(char[] values)
Add hash code for an
char array. |
abstract HashCodeBuilder |
and(double value)
Add hash code for a
double. |
abstract HashCodeBuilder |
and(double[] values)
Add hash code for an
double array. |
abstract HashCodeBuilder |
and(float value)
Add hash code for a
float. |
abstract HashCodeBuilder |
and(float[] values)
Add hash code for an
float array. |
abstract HashCodeBuilder |
and(int value)
Add hash code for an
int. |
abstract HashCodeBuilder |
and(int[] values)
Add hash code for an
int array. |
abstract HashCodeBuilder |
and(long value)
Add hash code for a
long. |
abstract HashCodeBuilder |
and(long[] values)
Add hash code for an
long array. |
abstract HashCodeBuilder |
and(Object value)
Add hash code for a
Object. |
abstract HashCodeBuilder |
and(Object[] values)
Add hash code for an
Object. |
abstract HashCodeBuilder |
and(Seq<?> values)
Add hash code for a
Seq. |
abstract HashCodeBuilder |
and(short value)
Add hash code for a
short. |
abstract HashCodeBuilder |
and(short[] values)
Add hash code for an
short array. |
int |
value()
Return the calculated hash value.
|
public abstract HashCodeBuilder and(boolean value)
boolean.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(boolean[] values)
boolean array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(byte value)
byte.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(byte[] values)
byte arrays.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(char value)
char.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(char[] values)
char array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(short value)
short.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(short[] values)
short array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(int value)
int.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(int[] values)
int array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(long value)
long.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(long[] values)
long array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(float value)
float.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(float[] values)
float array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(double value)
double.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(double[] values)
double array.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(Object value)
Object.value - the value to add to the hash code.thispublic abstract HashCodeBuilder and(Object[] values)
Object.values - the value to add to the hash code.thispublic abstract HashCodeBuilder and(Seq<?> values)
Seq.values - the value to add to the hash code.thispublic int value()
© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)