public class MurmurHash3 extends java.lang.Object implements Hash
Modifier and Type | Class and Description |
---|---|
static class |
MurmurHash3.Externalizer |
(package private) static class |
MurmurHash3.State |
Modifier and Type | Field and Description |
---|---|
private static java.nio.charset.Charset |
UTF8 |
Constructor and Description |
---|
MurmurHash3() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
bmix(MurmurHash3.State state) |
boolean |
equals(java.lang.Object other) |
(package private) static long |
fmix(long k) |
(package private) static long |
getblock(byte[] key,
int i) |
int |
hash(byte[] payload)
Hashes a byte array efficiently.
|
int |
hash(int hashcode)
An incremental version of the hash function, that spreads a pre-calculated
hash code, such as one derived from
Object.hashCode() . |
static int |
hash(long[] payload)
Hashes a byte array efficiently.
|
int |
hash(java.lang.Object o)
A helper that calculates the hashcode of an object, choosing the optimal
mechanism of hash calculation after considering the type of the object
(byte array, String or Object).
|
static long[] |
MurmurHash3_x64_128(byte[] key,
int seed)
Hash a value using the x64 128 bit variant of MurmurHash3
|
static long[] |
MurmurHash3_x64_128(long[] key,
int seed)
Hash a value using the x64 128 bit variant of MurmurHash3
|
static int |
MurmurHash3_x64_32(byte[] key,
int seed)
Hash a value using the x64 32 bit variant of MurmurHash3
|
static int |
MurmurHash3_x64_32(long[] key,
int seed)
Hash a value using the x64 32 bit variant of MurmurHash3
|
static long |
MurmurHash3_x64_64(byte[] key,
int seed)
Hash a value using the x64 64 bit variant of MurmurHash3
|
static long |
MurmurHash3_x64_64(long[] key,
int seed)
Hash a value using the x64 64 bit variant of MurmurHash3
|
java.lang.String |
toString() |
static long getblock(byte[] key, int i)
static void bmix(MurmurHash3.State state)
static long fmix(long k)
public static long[] MurmurHash3_x64_128(byte[] key, int seed)
key
- value to hashseed
- random valuepublic static long MurmurHash3_x64_64(byte[] key, int seed)
key
- value to hashseed
- random valuepublic static int MurmurHash3_x64_32(byte[] key, int seed)
key
- value to hashseed
- random valuepublic static long[] MurmurHash3_x64_128(long[] key, int seed)
key
- value to hashseed
- random valuepublic static long MurmurHash3_x64_64(long[] key, int seed)
key
- value to hashseed
- random valuepublic static int MurmurHash3_x64_32(long[] key, int seed)
key
- value to hashseed
- random valuepublic int hash(byte[] payload)
Hash
public static int hash(long[] payload)
payload
- a byte array to hashpublic int hash(int hashcode)
Hash
Object.hashCode()
.public int hash(java.lang.Object o)
Hash
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object