public class MurmurHash extends Object
The C version of MurmurHash 2.0 found at that site was ported to Java by Andrzej Bialecki (ab at getopt org).
Constructor and Description |
---|
MurmurHash() |
Modifier and Type | Method and Description |
---|---|
static int |
hash(byte[] data) |
static int |
hash(byte[] data,
int seed) |
static int |
hash(byte[] data,
int length,
int seed) |
static int |
hash(Object o) |
static long |
hash64(byte[] data,
int length)
Generates 64 bit hash from byte array with default seed value.
|
static long |
hash64(byte[] data,
int length,
int seed)
Generates 64 bit hash from byte array of the given length and seed.
|
static long |
hash64(Object o) |
static int |
hashLong(long data) |
public static int hash(Object o)
public static int hash(byte[] data)
public static int hash(byte[] data, int seed)
public static int hash(byte[] data, int length, int seed)
public static int hashLong(long data)
public static long hash64(Object o)
public static long hash64(byte[] data, int length)
data
- byte array to hashlength
- length of the array to hashpublic static long hash64(byte[] data, int length, int seed)
data
- byte array to hashlength
- length of the array to hashseed
- initial seed valueCopyright © 2019 AddThis. All rights reserved.