@Immutable public final class HashCodeCalculator extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HASHCODE_NULL
The hash code value to be used for
null values. |
static int |
MULTIPLIER
Each value is multiplied with this value. 31 because it can easily be
optimized to
(1 << 5) - 1. |
| Modifier and Type | Method and Description |
|---|---|
static int |
append(int nPrevHashCode,
boolean x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
byte x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
char x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
double x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
float x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
int x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
long x)
Atomic type hash code generation.
|
static int |
append(int nPrevHashCode,
Object x)
Object hash code generation.
|
static int |
append(int nPrevHashCode,
short x)
Atomic type hash code generation.
|
public static final int MULTIPLIER
(1 << 5) - 1.public static final int HASHCODE_NULL
null values. Do not use 0
as e.g. BigDecimal ("0") also results in a 0 hash code.public static int append(int nPrevHashCode,
boolean x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
byte x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
char x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
double x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
float x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
int x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
long x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addpublic static int append(int nPrevHashCode,
short x)
nPrevHashCode - The previous hash code used as the basis for calculationx - Array to addCopyright © 2006–2015 phloc systems. All rights reserved.