Package com.google.common.hash
Class Murmur3_32HashFunction.Murmur3_32Hasher
- java.lang.Object
-
- com.google.common.hash.AbstractHasher
-
- com.google.common.hash.AbstractStreamingHashFunction.AbstractStreamingHasher
-
- com.google.common.hash.Murmur3_32HashFunction.Murmur3_32Hasher
-
- All Implemented Interfaces:
Hasher,PrimitiveSink
- Enclosing class:
- Murmur3_32HashFunction
private static final class Murmur3_32HashFunction.Murmur3_32Hasher extends AbstractStreamingHashFunction.AbstractStreamingHasher
-
-
Field Summary
Fields Modifier and Type Field Description private static intCHUNK_SIZEprivate inth1private intlength
-
Constructor Summary
Constructors Constructor Description Murmur3_32Hasher(int seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HashCodemakeHash()protected voidprocess(java.nio.ByteBuffer bb)Processes the available bytes of the buffer (at mostchunkbytes).protected voidprocessRemaining(java.nio.ByteBuffer bb)This is invoked for the last bytes of the input, which are not enough to fill a whole chunk.-
Methods inherited from class com.google.common.hash.AbstractStreamingHashFunction.AbstractStreamingHasher
hash, putByte, putBytes, putBytes, putChar, putInt, putLong, putObject, putShort, putUnencodedChars
-
Methods inherited from class com.google.common.hash.AbstractHasher
putBoolean, putDouble, putFloat, putString
-
-
-
-
Field Detail
-
CHUNK_SIZE
private static final int CHUNK_SIZE
- See Also:
- Constant Field Values
-
h1
private int h1
-
length
private int length
-
-
Method Detail
-
process
protected void process(java.nio.ByteBuffer bb)
Description copied from class:AbstractStreamingHashFunction.AbstractStreamingHasherProcesses the available bytes of the buffer (at mostchunkbytes).- Specified by:
processin classAbstractStreamingHashFunction.AbstractStreamingHasher
-
processRemaining
protected void processRemaining(java.nio.ByteBuffer bb)
Description copied from class:AbstractStreamingHashFunction.AbstractStreamingHasherThis is invoked for the last bytes of the input, which are not enough to fill a whole chunk. The passedByteBufferis guaranteed to be non-empty.This implementation simply pads with zeros and delegates to
AbstractStreamingHashFunction.AbstractStreamingHasher.process(ByteBuffer).- Overrides:
processRemainingin classAbstractStreamingHashFunction.AbstractStreamingHasher
-
makeHash
public HashCode makeHash()
- Specified by:
makeHashin classAbstractStreamingHashFunction.AbstractStreamingHasher
-
-