The list of methods to do Hash Code Calculate are organized into topic(s).
int
combinedHashCode(Object... objects) Combines hash codes from multiple objects to make a new one.
final int prime = 31;
int result = 1;
for (Object obj : objects) {
result = prime * result + getHashCode(obj);
return result;
int
combineHashCodes(int numA, int numB, int numC) Combines 3 hash codes to make a new one.
final int prime = 31;
int result = 1;
result = prime * result + numA;
result = prime * result + numB;
result = prime * result + numC;
return result;
int
combineHashesMurmur(int hash2, int hash1) combine Hashes Murmur
hash1 *= 0xcc9e2d51;
hash1 = Integer.rotateLeft(hash1, 15);
hash1 *= 0x1b873593;
hash2 ^= hash1;
hash2 = Integer.rotateLeft(hash2, 13);
hash2 = hash2 * 5 + 0xe6546b64;
return hash2;
int
combineHashesOld(int hash1, int hash2) combine Hashes Old
hash1 ^= (hash2 & 0xff);
hash1 *= FNV_PRIME;
hash1 ^= (hash2 >>> 8) & 0xff;
hash1 *= FNV_PRIME;
hash1 ^= (hash2 >>> 16) & 0xff;
hash1 *= FNV_PRIME;
hash1 ^= (hash2 >>> 24) & 0xff;
hash1 *= FNV_PRIME;
...