public final class MurmurHash extends Object
Modifier and Type | Method and Description |
---|---|
static int |
finish(int hash,
int numberOfWords)
Apply the final computation steps to the intermediate value
hash
to form the final result of the MurmurHash 3 hash function. |
static <T> int |
hashCode(T[] data,
int seed)
Utility function to compute the hash code of an array using the
MurmurHash algorithm.
|
static int |
initialize()
Initialize the hash using the default seed value.
|
static int |
initialize(int seed)
Initialize the hash using the specified
seed . |
static int |
update(int hash,
int value)
Update the intermediate hash value for the next input
value . |
static int |
update(int hash,
Object value)
Update the intermediate hash value for the next input
value . |
public static int initialize()
public static int initialize(int seed)
seed
.seed
- the seedpublic static int update(int hash, int value)
value
.hash
- the intermediate hash valuevalue
- the value to add to the current hashpublic static int update(int hash, Object value)
value
.hash
- the intermediate hash valuevalue
- the value to add to the current hashpublic static int finish(int hash, int numberOfWords)
hash
to form the final result of the MurmurHash 3 hash function.hash
- the intermediate hash valuenumberOfWords
- the number of integer values added to the hashpublic static <T> int hashCode(T[] data, int seed)
T
- the array element typedata
- the array dataseed
- the seed for the MurmurHash algorithmCopyright © 1992–2021 ANTLR. All rights reserved.