Example usage for Java com.google.common.hash HashFunction fields, constructors, methods, implement or subclass
The text is from its open source code.
int | bits() Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has. |
HashCode | hashBytes(byte[] input) Shortcut for newHasher().putBytes(input).hash() . |
HashCode | hashBytes(byte[] input, int off, int len) Shortcut for newHasher().putBytes(input, off, len).hash() . |
HashCode | hashInt(int input) Shortcut for newHasher().putInt(input).hash() ; returns the hash code for the given int value, interpreted in little-endian byte order. |
HashCode | hashObject(T instance, Funnel super T> funnel) Shortcut for newHasher().putObject(instance, funnel).hash() . |
HashCode | hashString(CharSequence input, Charset charset) Shortcut for newHasher().putString(input, charset).hash() . |
HashCode | hashUnencodedChars(CharSequence input) Shortcut for newHasher().putUnencodedChars(input).hash() . |
Hasher | newHasher() Begins a new hash code computation by returning an initialized, stateful Hasher instance that is ready to receive data. |
Hasher | newHasher(int expectedInputSize) Begins a new hash code computation as #newHasher() , but provides a hint of the expected size of the input (in bytes). |