- 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 inthash(boolean value)Returns the hash code of the primitive `boolean` `value`.static inthash(byte value)Returns the hash code of the primitive `byte` `value`.static inthash(char value)Returns the hash code of the primitive `char` `value`.static inthash(double value)Returns the hash code of the primitive `double` `value`.static inthash(float value)Returns the hash code of the primitive `float` `value`.static inthash(int value)Returns the hash code of the primitive `int` `value`.static inthash(long value)Returns the hash code of the primitive `long` `value`.static inthash(short value)Returns the hash code of the primitive `short` `value`.static inthash(Number number)Returns the hash code of thenumber.static inthash(Object object)Returns the hash code of the–possiblynull–object.static intmash(int code)Finalizes a hashcode.static intmix(int code, byte[] array)Mixes each consecutive 4-byte word in thearrayinto the accumulated hashcode.static intmix(int code, byte[] array, int offset, int size)Mixes each consecutive 4-byte word in thearray, starting at indexoffset, and continuing forsizebytes, into the accumulated hashcode.static intmix(int code, int value)Mixes a new hashvalueinto the accumulated cumulative hashcode.static intmix(int code, String string)Mixes each consecutive 4-byte word in the UTF-8 encoding of thestringinto the accumulated hashcode.static intseed(Class<?> clazz)Returns the hash code of the name of the class.static intseed(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 forsizebytes, into the accumulated hashcode.
-
mix
public static int mix(int code, byte[] array)Mixes each consecutive 4-byte word in thearrayinto the accumulated hashcode.
-
mix
public static int mix(int code, String string)Mixes each consecutive 4-byte word in the UTF-8 encoding of thestringinto the accumulated hashcode.
-
mix
public static int mix(int code, int value)Mixes a new hashvalueinto the accumulated cumulative hashcode.
-
mash
public static int mash(int code)
Finalizes a hashcode.
-
-