Package | Description |
---|---|
com.google.common.hash |
Hash functions and related structures.
|
Modifier and Type | Method and Description |
---|---|
Hasher |
HashFunction.newHasher()
Begins a new hash code computation by returning an initialized, stateful
Hasher
instance that is ready to receive data. |
Hasher |
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). |
Hasher |
Hasher.putBoolean(boolean b)
Equivalent to
putByte(b ? (byte) 1 : (byte) 0) . |
Hasher |
Hasher.putByte(byte b) |
Hasher |
Hasher.putBytes(byte[] bytes) |
Hasher |
Hasher.putBytes(byte[] bytes,
int off,
int len) |
Hasher |
Hasher.putBytes(ByteBuffer bytes) |
Hasher |
Hasher.putChar(char c) |
Hasher |
Hasher.putDouble(double d)
Equivalent to
putLong(Double.doubleToRawLongBits(d)) . |
Hasher |
Hasher.putFloat(float f)
Equivalent to
putInt(Float.floatToRawIntBits(f)) . |
Hasher |
Hasher.putInt(int i) |
Hasher |
Hasher.putLong(long l) |
<T> Hasher |
Hasher.putObject(T instance,
Funnel<? super T> funnel)
A simple convenience for
funnel.funnel(object, this) . |
Hasher |
Hasher.putShort(short s) |
Hasher |
Hasher.putString(CharSequence charSequence,
Charset charset)
Equivalent to
putBytes(charSequence.toString().getBytes(charset)) . |
Hasher |
Hasher.putUnencodedChars(CharSequence charSequence)
Equivalent to processing each
char value in the CharSequence , in order. |
Copyright © 2010–2019. All rights reserved.