-
Begins a new hash code computation by returning an initialized, stateful
Hasher
instance that is ready to receive data.
HashFunction.newHasher(int expectedInputSize)
Begins a new hash code computation as
HashFunction.newHasher()
, but provides a hint of the expected
size of the input (in bytes).
Equivalent to putByte(b ? (byte) 1 : (byte) 0)
.
Hasher.put(byte[] bytes,
int off,
int len)
Hasher.put(char[] chars,
int off,
int len)
Equivalent to putLong(Double.doubleToRawLongBits(d))
.
Equivalent to putInt(Float.floatToRawIntBits(f))
.
Equivalent to processing each char
value in the CharSequence
, in order.
Equivalent to putBytes(charSequence.toString().getBytes(charset))
.
Hasher.put(T instance,
com.google.common.hash.Funnel<? super T> funnel)
A simple convenience for funnel.funnel(object, this)
.