Uses of Class
com.google.common.hash.HashCode
Packages that use HashCode
Package
Description
Hash functions and related structures.
Utility methods and classes for I/O; for example input streams, output streams, readers, writers,
and files.
-
Uses of HashCode in com.google.common.hash
Subclasses of HashCode in com.google.common.hashModifier and TypeClassDescriptionprivate static final class
private static final class
private static final class
Methods in com.google.common.hash that return HashCodeModifier and TypeMethodDescriptionstatic HashCode
Hashing.combineOrdered
(Iterable<HashCode> hashCodes) Returns a hash code, having the same bit length as each of the input hash codes, that combines the information of these hash codes in an ordered fashion.static HashCode
Hashing.combineUnordered
(Iterable<HashCode> hashCodes) Returns a hash code, having the same bit length as each of the input hash codes, that combines the information of these hash codes in an unordered fashion.private static HashCode
Murmur3_32HashFunction.fmix
(int h1, int length) static HashCode
HashCode.fromBytes
(byte[] bytes) Creates aHashCode
from a byte array.(package private) static HashCode
HashCode.fromBytesNoCopy
(byte[] bytes) Creates aHashCode
from a byte array.static HashCode
HashCode.fromInt
(int hash) Creates a 32-bitHashCode
representation of the given int value.static HashCode
HashCode.fromLong
(long hash) Creates a 64-bitHashCode
representation of the given long value.static HashCode
HashCode.fromString
(String string) Creates aHashCode
from a hexadecimal (base 16
) encoded string.AbstractNonStreamingHashFunction.BufferingHasher.hash()
final HashCode
AbstractStreamingHasher.hash()
ChecksumHashFunction.ChecksumHasher.hash()
Hasher.hash()
Computes a hash code based on the data that have been provided to this hasher.HashingInputStream.hash()
Returns theHashCode
based on the data read from this stream.HashingOutputStream.hash()
Returns theHashCode
based on the data written to this stream.MacHashFunction.MacHasher.hash()
MessageDigestHashFunction.MessageDigestHasher.hash()
Murmur3_32HashFunction.Murmur3_32Hasher.hash()
AbstractHashFunction.hashBytes
(byte[] input) AbstractHashFunction.hashBytes
(byte[] input, int off, int len) AbstractHashFunction.hashBytes
(ByteBuffer input) abstract HashCode
AbstractNonStreamingHashFunction.hashBytes
(byte[] input, int off, int len) AbstractNonStreamingHashFunction.hashBytes
(ByteBuffer input) FarmHashFingerprint64.hashBytes
(byte[] input, int off, int len) Fingerprint2011.hashBytes
(byte[] input, int off, int len) HashFunction.hashBytes
(byte[] input) Shortcut fornewHasher().putBytes(input).hash()
.HashFunction.hashBytes
(byte[] input, int off, int len) Shortcut fornewHasher().putBytes(input, off, len).hash()
.HashFunction.hashBytes
(ByteBuffer input) Shortcut fornewHasher().putBytes(input).hash()
.Murmur3_32HashFunction.hashBytes
(byte[] input, int off, int len) AbstractHashFunction.hashInt
(int input) AbstractNonStreamingHashFunction.hashInt
(int input) HashFunction.hashInt
(int input) Shortcut fornewHasher().putInt(input).hash()
; returns the hash code for the givenint
value, interpreted in little-endian byte order.Murmur3_32HashFunction.hashInt
(int input) AbstractHashFunction.hashLong
(long input) AbstractNonStreamingHashFunction.hashLong
(long input) HashFunction.hashLong
(long input) Shortcut fornewHasher().putLong(input).hash()
; returns the hash code for the givenlong
value, interpreted in little-endian byte order.Murmur3_32HashFunction.hashLong
(long input) <T> HashCode
AbstractHashFunction.hashObject
(T instance, Funnel<? super T> funnel) <T> HashCode
HashFunction.hashObject
(T instance, Funnel<? super T> funnel) Shortcut fornewHasher().putObject(instance, funnel).hash()
.AbstractHashFunction.hashString
(CharSequence input, Charset charset) AbstractNonStreamingHashFunction.hashString
(CharSequence input, Charset charset) HashFunction.hashString
(CharSequence input, Charset charset) Shortcut fornewHasher().putString(input, charset).hash()
.Murmur3_32HashFunction.hashString
(CharSequence input, Charset charset) AbstractHashFunction.hashUnencodedChars
(CharSequence input) AbstractNonStreamingHashFunction.hashUnencodedChars
(CharSequence input) HashFunction.hashUnencodedChars
(CharSequence input) Shortcut fornewHasher().putUnencodedChars(input).hash()
.Murmur3_32HashFunction.hashUnencodedChars
(CharSequence input) (package private) abstract HashCode
Constructs aHashCode
from theHasher
objects of the functions.protected abstract HashCode
AbstractStreamingHasher.makeHash()
Computes a hash code based on the data that have been provided to this hasher.protected HashCode
Crc32cHashFunction.Crc32cHasher.makeHash()
(package private) HashCode
protected HashCode
Murmur3_128HashFunction.Murmur3_128Hasher.makeHash()
protected HashCode
SipHashFunction.SipHasher.makeHash()
Methods in com.google.common.hash with parameters of type HashCodeModifier and TypeMethodDescriptionstatic int
Hashing.consistentHash
(HashCode hashCode, int buckets) Assigns tohashCode
a "bucket" in the range[0, buckets)
, in a uniform manner that minimizes the need for remapping asbuckets
grows.(package private) boolean
HashCode.BytesHashCode.equalsSameBits
(HashCode that) (package private) abstract boolean
HashCode.equalsSameBits
(HashCode that) Returns whether thisHashCode
and thatHashCode
have the same value, given that they have the same number of bits.(package private) boolean
HashCode.IntHashCode.equalsSameBits
(HashCode that) (package private) boolean
HashCode.LongHashCode.equalsSameBits
(HashCode that) Method parameters in com.google.common.hash with type arguments of type HashCodeModifier and TypeMethodDescriptionstatic HashCode
Hashing.combineOrdered
(Iterable<HashCode> hashCodes) Returns a hash code, having the same bit length as each of the input hash codes, that combines the information of these hash codes in an ordered fashion.static HashCode
Hashing.combineUnordered
(Iterable<HashCode> hashCodes) Returns a hash code, having the same bit length as each of the input hash codes, that combines the information of these hash codes in an unordered fashion. -
Uses of HashCode in com.google.common.io
Methods in com.google.common.io that return HashCodeModifier and TypeMethodDescriptionByteSource.ByteArrayByteSource.hash
(HashFunction hashFunction) ByteSource.hash
(HashFunction hashFunction) Hashes the contents of this byte source using the given hash function.static HashCode
Files.hash
(File file, HashFunction hashFunction) Deprecated.
asByteSource(file).hash(hashFunction)
.