Package com.google.common.hash
Class Murmur3_128HashFunction
- java.lang.Object
-
- com.google.common.hash.AbstractHashFunction
-
- com.google.common.hash.Murmur3_128HashFunction
-
- All Implemented Interfaces:
HashFunction,java.io.Serializable
final class Murmur3_128HashFunction extends AbstractHashFunction implements java.io.Serializable
See MurmurHash3_x64_128 in the C++ implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMurmur3_128HashFunction.Murmur3_128Hasher
-
Field Summary
Fields Modifier and Type Field Description (package private) static HashFunctionGOOD_FAST_HASH_128(package private) static HashFunctionMURMUR3_128private intseedprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description Murmur3_128HashFunction(int seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbits()Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.booleanequals(java.lang.Object object)inthashCode()HashernewHasher()Begins a new hash code computation by returning an initialized, statefulHasherinstance that is ready to receive data.java.lang.StringtoString()-
Methods inherited from class com.google.common.hash.AbstractHashFunction
hashBytes, hashBytes, hashBytes, hashInt, hashLong, hashObject, hashString, hashUnencodedChars, newHasher
-
-
-
-
Field Detail
-
MURMUR3_128
static final HashFunction MURMUR3_128
-
GOOD_FAST_HASH_128
static final HashFunction GOOD_FAST_HASH_128
-
seed
private final int seed
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
bits
public int bits()
Description copied from interface:HashFunctionReturns the number of bits (a multiple of 32) that each hash code produced by this hash function has.- Specified by:
bitsin interfaceHashFunction
-
newHasher
public Hasher newHasher()
Description copied from interface:HashFunctionBegins a new hash code computation by returning an initialized, statefulHasherinstance that is ready to receive data. Example:HashFunction hf = Hashing.md5(); HashCode hc = hf.newHasher() .putLong(id) .putBoolean(isActive) .hash();- Specified by:
newHasherin interfaceHashFunction
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-