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
Methods in com.google.common.hash that return HashCodeModifier and TypeMethodDescriptionstatic HashCodeHashing.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 HashCodeHashing.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.static HashCodeHashCode.fromBytes(byte[] bytes) Creates aHashCodefrom a byte array.static HashCodeHashCode.fromInt(int hash) Creates a 32-bitHashCoderepresentation of the given int value.static HashCodeHashCode.fromLong(long hash) Creates a 64-bitHashCoderepresentation of the given long value.static HashCodeHashCode.fromString(String string) Creates aHashCodefrom a hexadecimal (base 16) encoded string.Hasher.hash()Computes a hash code based on the data that have been provided to this hasher.HashingInputStream.hash()Returns theHashCodebased on the data read from this stream.HashingOutputStream.hash()Returns theHashCodebased on the data written to this stream.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().HashFunction.hashInt(int input) Shortcut fornewHasher().putInt(input).hash(); returns the hash code for the givenintvalue, interpreted in little-endian byte order.HashFunction.hashLong(long input) Shortcut fornewHasher().putLong(input).hash(); returns the hash code for the givenlongvalue, interpreted in little-endian byte order.HashFunction.hashObject(T instance, Funnel<? super T> funnel) Shortcut fornewHasher().putObject(instance, funnel).hash().HashFunction.hashString(CharSequence input, Charset charset) Shortcut fornewHasher().putString(input, charset).hash().HashFunction.hashUnencodedChars(CharSequence input) Shortcut fornewHasher().putUnencodedChars(input).hash().Methods in com.google.common.hash with parameters of type HashCodeModifier and TypeMethodDescriptionstatic intHashing.consistentHash(HashCode hashCode, int buckets) Assigns tohashCodea "bucket" in the range[0, buckets), in a uniform manner that minimizes the need for remapping asbucketsgrows.Method parameters in com.google.common.hash with type arguments of type HashCodeModifier and TypeMethodDescriptionstatic HashCodeHashing.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 HashCodeHashing.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.hash(HashFunction hashFunction) Hashes the contents of this byte source using the given hash function.static HashCodeFiles.hash(File file, HashFunction hashFunction) Deprecated.
asByteSource(file).hash(hashFunction).