public class HashCodes
extends java.lang.Object
hashCode()
methods.
For example:
public class Foo {
@NonNull private String a;
@Nullable private String b;
private boolean c;
private int d;
@Override
public int hashCode() {
return HashCodes.mix(a.hashCode(), Objects.hashCode(b), Boolean.hashCode(c), d);
}
}
Modifier and Type | Method and Description |
---|---|
static int |
mix(int hashCode1,
int hashCode2)
Combines two hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3)
Combines three hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4)
Combines four hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4,
int hashCode5)
Combines five hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4,
int hashCode5,
int hashCode6)
Combines six hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4,
int hashCode5,
int hashCode6,
int hashCode7)
Combines seven hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4,
int hashCode5,
int hashCode6,
int hashCode7,
int hashCode8)
Combines eight hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4,
int hashCode5,
int hashCode6,
int hashCode7,
int hashCode8,
int hashCode9)
Combines nine hash codes into one.
|
static int |
mix(int hashCode1,
int hashCode2,
int hashCode3,
int hashCode4,
int hashCode5,
int hashCode6,
int hashCode7,
int hashCode8,
int hashCode9,
int hashCode10)
Combines ten hash codes into one.
|
public static int mix(int hashCode1, int hashCode2)
public static int mix(int hashCode1, int hashCode2, int hashCode3)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4, int hashCode5)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4, int hashCode5, int hashCode6)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4, int hashCode5, int hashCode6, int hashCode7)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4, int hashCode5, int hashCode6, int hashCode7, int hashCode8)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4, int hashCode5, int hashCode6, int hashCode7, int hashCode8, int hashCode9)
public static int mix(int hashCode1, int hashCode2, int hashCode3, int hashCode4, int hashCode5, int hashCode6, int hashCode7, int hashCode8, int hashCode9, int hashCode10)