- java.lang.Object
-
- swim.util.Murmur3
-
public final class Murmur3 extends Object
32-bit MurmurHash algorithm, version 3.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
hash(boolean value)
Returns the hash code of the primitive `boolean` `value`.static int
hash(byte value)
Returns the hash code of the primitive `byte` `value`.static int
hash(char value)
Returns the hash code of the primitive `char` `value`.static int
hash(double value)
Returns the hash code of the primitive `double` `value`.static int
hash(float value)
Returns the hash code of the primitive `float` `value`.static int
hash(int value)
Returns the hash code of the primitive `int` `value`.static int
hash(long value)
Returns the hash code of the primitive `long` `value`.static int
hash(short value)
Returns the hash code of the primitive `short` `value`.static int
hash(Number number)
Returns the hash code of thenumber
.static int
hash(Object object)
Returns the hash code of the–possiblynull
–object
.static int
mash(int code)
Finalizes a hashcode
.static int
mix(int code, byte[] array)
Mixes each consecutive 4-byte word in thearray
into the accumulated hashcode
.static int
mix(int code, byte[] array, int offset, int size)
Mixes each consecutive 4-byte word in thearray
, starting at indexoffset
, and continuing forsize
bytes, into the accumulated hashcode
.static int
mix(int code, int value)
Mixes a new hashvalue
into the accumulated cumulative hashcode
.static int
mix(int code, String string)
Mixes each consecutive 4-byte word in the UTF-8 encoding of thestring
into the accumulated hashcode
.static int
seed(Class<?> clazz)
Returns the hash code of the name of the class.static int
seed(String string)
Returns the hash code of thestring
.
-
-
-
Method Detail
-
seed
public static int seed(Class<?> clazz)
Returns the hash code of the name of the class.
-
seed
public static int seed(String string)
Returns the hash code of thestring
.
-
hash
public static int hash(byte value)
Returns the hash code of the primitive `byte` `value`.
-
hash
public static int hash(short value)
Returns the hash code of the primitive `short` `value`.
-
hash
public static int hash(int value)
Returns the hash code of the primitive `int` `value`.
-
hash
public static int hash(long value)
Returns the hash code of the primitive `long` `value`.
-
hash
public static int hash(float value)
Returns the hash code of the primitive `float` `value`.
-
hash
public static int hash(double value)
Returns the hash code of the primitive `double` `value`.
-
hash
public static int hash(char value)
Returns the hash code of the primitive `char` `value`.
-
hash
public static int hash(boolean value)
Returns the hash code of the primitive `boolean` `value`.
-
hash
public static int hash(Number number)
Returns the hash code of thenumber
.
-
hash
public static int hash(Object object)
Returns the hash code of the–possiblynull
–object
.
-
mix
public static int mix(int code, byte[] array, int offset, int size)
Mixes each consecutive 4-byte word in thearray
, starting at indexoffset
, and continuing forsize
bytes, into the accumulated hashcode
.
-
mix
public static int mix(int code, byte[] array)
Mixes each consecutive 4-byte word in thearray
into the accumulated hashcode
.
-
mix
public static int mix(int code, String string)
Mixes each consecutive 4-byte word in the UTF-8 encoding of thestring
into the accumulated hashcode
.
-
mix
public static int mix(int code, int value)
Mixes a new hashvalue
into the accumulated cumulative hashcode
.
-
mash
public static int mash(int code)
Finalizes a hashcode
.
-
-