Index
All Classes and Interfaces|All Packages|Serialized Form
A
- adler32() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Adler-32 checksum algorithm (32 hash bits).
- apply(T) - Method in class dev.mccue.guava.hash.BloomFilter
-
Deprecated.
- approximateElementCount() - Method in class dev.mccue.guava.hash.BloomFilter
-
Returns an estimate for the total number of distinct elements that have been added to this Bloom filter.
- asBytes() - Method in class dev.mccue.guava.hash.HashCode
-
Returns the value of this hash code as a byte array.
- asInt() - Method in class dev.mccue.guava.hash.HashCode
-
Returns the first four bytes of this hashcode's bytes, converted to an
intvalue in little-endian order. - asLong() - Method in class dev.mccue.guava.hash.HashCode
-
Returns the first eight bytes of this hashcode's bytes, converted to a
longvalue in little-endian order. - asOutputStream(PrimitiveSink) - Static method in class dev.mccue.guava.hash.Funnels
-
Wraps a
PrimitiveSinkas anOutputStream, so it is easy tofunnelan object to aPrimitiveSinkif there is already a way to write the contents of the object to anOutputStream.
B
- bits() - Method in class dev.mccue.guava.hash.HashCode
-
Returns the number of bits in this hash code; a positive multiple of 8.
- bits() - Method in interface dev.mccue.guava.hash.HashFunction
-
Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
- BloomFilter<T extends @Nullable Object> - Class in dev.mccue.guava.hash
-
A Bloom filter for instances of
T. - byteArrayFunnel() - Static method in class dev.mccue.guava.hash.Funnels
-
Returns a funnel that extracts the bytes from a
bytearray.
C
- close() - Method in class dev.mccue.guava.hash.HashingOutputStream
- combineOrdered(Iterable<HashCode>) - Static method in class dev.mccue.guava.hash.Hashing
-
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.
- combineUnordered(Iterable<HashCode>) - Static method in class dev.mccue.guava.hash.Hashing
-
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.
- concatenating(HashFunction, HashFunction, HashFunction...) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function which computes its hash code by concatenating the hash codes of the underlying hash functions together.
- concatenating(Iterable<HashFunction>) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function which computes its hash code by concatenating the hash codes of the underlying hash functions together.
- consistentHash(long, int) - Static method in class dev.mccue.guava.hash.Hashing
-
Assigns to
inputa "bucket" in the range[0, buckets), in a uniform manner that minimizes the need for remapping asbucketsgrows. - consistentHash(HashCode, int) - Static method in class dev.mccue.guava.hash.Hashing
-
Assigns to
hashCodea "bucket" in the range[0, buckets), in a uniform manner that minimizes the need for remapping asbucketsgrows. - copy() - Method in class dev.mccue.guava.hash.BloomFilter
-
Creates a new
BloomFilterthat's a copy of this instance. - crc32() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the CRC-32 checksum algorithm (32 hash bits).
- crc32c() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the CRC32C checksum algorithm (32 hash bits) as described by RFC 3720, Section 12.1.
- create(Funnel<? super T>, int) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Creates a
BloomFilterwith the expected number of insertions and a default expected false positive probability of 3%. - create(Funnel<? super T>, int, double) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Creates a
BloomFilterwith the expected number of insertions and expected false positive probability. - create(Funnel<? super T>, long) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Creates a
BloomFilterwith the expected number of insertions and a default expected false positive probability of 3%. - create(Funnel<? super T>, long, double) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Creates a
BloomFilterwith the expected number of insertions and expected false positive probability.
D
- dev.mccue.guava.hash - module dev.mccue.guava.hash
- dev.mccue.guava.hash - package dev.mccue.guava.hash
-
Hash functions and related structures.
E
- equals(Object) - Method in class dev.mccue.guava.hash.BloomFilter
- equals(Object) - Method in class dev.mccue.guava.hash.HashCode
-
Returns
trueifobjectis aHashCodeinstance with the identical byte representation to this hash code. - expectedFpp() - Method in class dev.mccue.guava.hash.BloomFilter
-
Returns the probability that BloomFilter.mightContain(Object) will erroneously return
truefor an object that has not actually been put in theBloomFilter.
F
- farmHashFingerprint64() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing FarmHash's Fingerprint64, an open-source algorithm.
- fingerprint2011() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Fingerprint2011 hashing function (64 hash bits).
- fromBytes(byte[]) - Static method in class dev.mccue.guava.hash.HashCode
-
Creates a
HashCodefrom a byte array. - fromInt(int) - Static method in class dev.mccue.guava.hash.HashCode
-
Creates a 32-bit
HashCoderepresentation of the given int value. - fromLong(long) - Static method in class dev.mccue.guava.hash.HashCode
-
Creates a 64-bit
HashCoderepresentation of the given long value. - fromString(String) - Static method in class dev.mccue.guava.hash.HashCode
-
Creates a
HashCodefrom a hexadecimal (base 16) encoded string. - funnel(T, PrimitiveSink) - Method in interface dev.mccue.guava.hash.Funnel
-
Sends a stream of data from the
fromobject into the sinkinto. - Funnel<T extends @Nullable Object> - Interface in dev.mccue.guava.hash
-
An object which can send data from an object of type
Tinto aPrimitiveSink. - Funnels - Class in dev.mccue.guava.hash
-
Funnels for common types.
G
- goodFastHash(int) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a general-purpose, temporary-use, non-cryptographic hash function.
H
- hash() - Method in interface dev.mccue.guava.hash.Hasher
-
Computes a hash code based on the data that have been provided to this hasher.
- hash() - Method in class dev.mccue.guava.hash.HashingInputStream
-
Returns the
HashCodebased on the data read from this stream. - hash() - Method in class dev.mccue.guava.hash.HashingOutputStream
-
Returns the
HashCodebased on the data written to this stream. - hashBytes(byte[]) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putBytes(input).hash(). - hashBytes(byte[], int, int) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putBytes(input, off, len).hash(). - hashBytes(ByteBuffer) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putBytes(input).hash(). - hashCode() - Method in class dev.mccue.guava.hash.BloomFilter
- hashCode() - Method in class dev.mccue.guava.hash.HashCode
-
Returns a "Java hash code" for this
HashCodeinstance; this is well-defined (so, for example, you can safely putHashCodeinstances into aHashSet) but is otherwise probably not what you want to use. - hashCode() - Method in interface dev.mccue.guava.hash.Hasher
-
Deprecated.This returns
Object.hashCode(); you almost certainly mean to callhash().asInt(). - HashCode - Class in dev.mccue.guava.hash
-
An immutable hash code of arbitrary bit length.
- Hasher - Interface in dev.mccue.guava.hash
-
A
PrimitiveSinkthat can compute a hash code after reading the input. - HashFunction - Interface in dev.mccue.guava.hash
-
A hash function is a collision-averse pure function that maps an arbitrary block of data to a number called a hash code.
- Hashing - Class in dev.mccue.guava.hash
-
Static methods to obtain
HashFunctioninstances, and other static hashing-related utilities. - HashingInputStream - Class in dev.mccue.guava.hash
-
An
InputStreamthat maintains a hash of the data read from it. - HashingInputStream(HashFunction, InputStream) - Constructor for class dev.mccue.guava.hash.HashingInputStream
-
Creates an input stream that hashes using the given
HashFunctionand delegates all data read from it to the underlyingInputStream. - HashingOutputStream - Class in dev.mccue.guava.hash
-
An
OutputStreamthat maintains a hash of the data written to it. - HashingOutputStream(HashFunction, OutputStream) - Constructor for class dev.mccue.guava.hash.HashingOutputStream
-
Creates an output stream that hashes using the given
HashFunction, and forwards all data written to it to the underlyingOutputStream. - hashInt(int) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putInt(input).hash(); returns the hash code for the givenintvalue, interpreted in little-endian byte order. - hashLong(long) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putLong(input).hash(); returns the hash code for the givenlongvalue, interpreted in little-endian byte order. - hashObject(T, Funnel<? super T>) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putObject(instance, funnel).hash(). - hashString(CharSequence, Charset) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putString(input, charset).hash(). - hashUnencodedChars(CharSequence) - Method in interface dev.mccue.guava.hash.HashFunction
-
Shortcut for
newHasher().putUnencodedChars(input).hash(). - hmacMd5(byte[]) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the MD5 (128 hash bits) hash function and a
SecretKeySpeccreated from the given byte array and the MD5 algorithm. - hmacMd5(Key) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the MD5 (128 hash bits) hash function and the given secret key.
- hmacSha1(byte[]) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-1 (160 hash bits) hash function and a
SecretKeySpeccreated from the given byte array and the SHA-1 algorithm. - hmacSha1(Key) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-1 (160 hash bits) hash function and the given secret key.
- hmacSha256(byte[]) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-256 (256 hash bits) hash function and a
SecretKeySpeccreated from the given byte array and the SHA-256 algorithm. - hmacSha256(Key) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-256 (256 hash bits) hash function and the given secret key.
- hmacSha512(byte[]) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-512 (512 hash bits) hash function and a
SecretKeySpeccreated from the given byte array and the SHA-512 algorithm. - hmacSha512(Key) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-512 (512 hash bits) hash function and the given secret key.
I
- integerFunnel() - Static method in class dev.mccue.guava.hash.Funnels
-
Returns a funnel for integers.
- isCompatible(BloomFilter<T>) - Method in class dev.mccue.guava.hash.BloomFilter
-
Determines whether a given Bloom filter is compatible with this Bloom filter.
L
- longFunnel() - Static method in class dev.mccue.guava.hash.Funnels
-
Returns a funnel for longs.
M
- mark(int) - Method in class dev.mccue.guava.hash.HashingInputStream
-
mark() is not supported for HashingInputStream
- markSupported() - Method in class dev.mccue.guava.hash.HashingInputStream
-
mark() is not supported for HashingInputStream
- md5() - Static method in class dev.mccue.guava.hash.Hashing
-
Deprecated.If you must interoperate with a system that requires MD5, then use this method, despite its deprecation. But if you can choose your hash function, avoid MD5, which is neither fast nor secure. As of January 2017, we suggest:
- For security:
sha256()or a higher-level API. - For speed:
goodFastHash(int), though see its docs for caveats.
- For security:
- mightContain(T) - Method in class dev.mccue.guava.hash.BloomFilter
-
Returns
trueif the element might have been put in this Bloom filter,falseif this is definitely not the case. - murmur3_128() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the 128-bit murmur3 algorithm, x64 variant (little-endian variant), using a seed value of zero.
- murmur3_128(int) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the 128-bit murmur3 algorithm, x64 variant (little-endian variant), using the given seed value.
- murmur3_32() - Static method in class dev.mccue.guava.hash.Hashing
-
Deprecated.This implementation produces incorrect hash values from the
HashFunction.hashString(java.lang.CharSequence, java.nio.charset.Charset)method if the string contains non-BMP characters. Usemurmur3_32_fixed()instead. - murmur3_32(int) - Static method in class dev.mccue.guava.hash.Hashing
-
Deprecated.This implementation produces incorrect hash values from the
HashFunction.hashString(java.lang.CharSequence, java.nio.charset.Charset)method if the string contains non-BMP characters. Usemurmur3_32_fixed(int)instead. - murmur3_32_fixed() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the 32-bit murmur3 algorithm, x86 variant (little-endian variant), using a seed value of zero.
- murmur3_32_fixed(int) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the 32-bit murmur3 algorithm, x86 variant (little-endian variant), using the given seed value.
N
- newHasher() - Method in interface dev.mccue.guava.hash.HashFunction
-
Begins a new hash code computation by returning an initialized, stateful
Hasherinstance that is ready to receive data. - newHasher(int) - Method in interface dev.mccue.guava.hash.HashFunction
-
Begins a new hash code computation as
HashFunction.newHasher(), but provides a hint of the expected size of the input (in bytes).
P
- padToLong() - Method in class dev.mccue.guava.hash.HashCode
-
If this hashcode has enough bits, returns
asLong(), otherwise returns alongvalue withasBytes()as the least-significant bytes and0x00as the remaining most-significant bytes. - PrimitiveSink - Interface in dev.mccue.guava.hash
-
An object which can receive a stream of primitive values.
- put(T) - Method in class dev.mccue.guava.hash.BloomFilter
-
Puts an element into this
BloomFilter. - putAll(BloomFilter<T>) - Method in class dev.mccue.guava.hash.BloomFilter
-
Combines this Bloom filter with another Bloom filter by performing a bitwise OR of the underlying data.
- putBoolean(boolean) - Method in interface dev.mccue.guava.hash.Hasher
-
Equivalent to
putByte(b ? (byte) 1 : (byte) 0). - putBoolean(boolean) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a boolean into this sink.
- putByte(byte) - Method in interface dev.mccue.guava.hash.Hasher
- putByte(byte) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a byte into this sink.
- putBytes(byte[]) - Method in interface dev.mccue.guava.hash.Hasher
- putBytes(byte[]) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts an array of bytes into this sink.
- putBytes(byte[], int, int) - Method in interface dev.mccue.guava.hash.Hasher
- putBytes(byte[], int, int) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a chunk of an array of bytes into this sink.
- putBytes(ByteBuffer) - Method in interface dev.mccue.guava.hash.Hasher
- putBytes(ByteBuffer) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts the remaining bytes of a byte buffer into this sink.
- putChar(char) - Method in interface dev.mccue.guava.hash.Hasher
- putChar(char) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a character into this sink.
- putDouble(double) - Method in interface dev.mccue.guava.hash.Hasher
-
Equivalent to
putLong(Double.doubleToRawLongBits(d)). - putDouble(double) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a double into this sink.
- putFloat(float) - Method in interface dev.mccue.guava.hash.Hasher
-
Equivalent to
putInt(Float.floatToRawIntBits(f)). - putFloat(float) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a float into this sink.
- putInt(int) - Method in interface dev.mccue.guava.hash.Hasher
- putInt(int) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts an int into this sink.
- putLong(long) - Method in interface dev.mccue.guava.hash.Hasher
- putLong(long) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a long into this sink.
- putObject(T, Funnel<? super T>) - Method in interface dev.mccue.guava.hash.Hasher
-
A simple convenience for
funnel.funnel(object, this). - putShort(short) - Method in interface dev.mccue.guava.hash.Hasher
- putShort(short) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a short into this sink.
- putString(CharSequence, Charset) - Method in interface dev.mccue.guava.hash.Hasher
-
Equivalent to
putBytes(charSequence.toString().getBytes(charset)). - putString(CharSequence, Charset) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts a string into this sink using the given charset.
- putUnencodedChars(CharSequence) - Method in interface dev.mccue.guava.hash.Hasher
-
Equivalent to processing each
charvalue in theCharSequence, in order. - putUnencodedChars(CharSequence) - Method in interface dev.mccue.guava.hash.PrimitiveSink
-
Puts each 16-bit code unit from the
CharSequenceinto this sink.
R
- read() - Method in class dev.mccue.guava.hash.HashingInputStream
-
Reads the next byte of data from the underlying input stream and updates the hasher with the byte read.
- read(byte[], int, int) - Method in class dev.mccue.guava.hash.HashingInputStream
-
Reads the specified bytes of data from the underlying input stream and updates the hasher with the bytes read.
- readFrom(InputStream, Funnel<? super T>) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Reads a byte stream, which was written by BloomFilter.writeTo(OutputStream), into a
BloomFilter. - reset() - Method in class dev.mccue.guava.hash.HashingInputStream
-
reset() is not supported for HashingInputStream.
S
- sequentialFunnel(Funnel<E>) - Static method in class dev.mccue.guava.hash.Funnels
-
Returns a funnel that processes an
Iterableby funneling its elements in iteration order with the specified funnel. - sha1() - Static method in class dev.mccue.guava.hash.Hashing
-
Deprecated.If you must interoperate with a system that requires SHA-1, then use this method, despite its deprecation. But if you can choose your hash function, avoid SHA-1, which is neither fast nor secure. As of January 2017, we suggest:
- For security:
sha256()or a higher-level API. - For speed:
goodFastHash(int), though see its docs for caveats.
- For security:
- sha256() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the SHA-256 algorithm (256 hash bits).
- sha384() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the SHA-384 algorithm (384 hash bits).
- sha512() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the SHA-512 algorithm (512 hash bits).
- sipHash24() - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the 64-bit SipHash-2-4 algorithm using a seed value of
k = 00 01 02 .... - sipHash24(long, long) - Static method in class dev.mccue.guava.hash.Hashing
-
Returns a hash function implementing the 64-bit SipHash-2-4 algorithm using the given seed.
- stringFunnel(Charset) - Static method in class dev.mccue.guava.hash.Funnels
-
Returns a funnel that encodes the characters of a
CharSequencewith the specifiedCharset.
T
- toBloomFilter(Funnel<? super T>, long) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Returns a
Collectorexpecting the specified number of insertions, and yielding aBloomFilterwith false positive probability 3%. - toBloomFilter(Funnel<? super T>, long, double) - Static method in class dev.mccue.guava.hash.BloomFilter
-
Returns a
Collectorexpecting the specified number of insertions, and yielding aBloomFilterwith the specified expected false positive probability. - toString() - Method in class dev.mccue.guava.hash.HashCode
-
Returns a string containing each byte of
HashCode.asBytes(), in order, as a two-digit unsigned hexadecimal number in lower case.
U
- unencodedCharsFunnel() - Static method in class dev.mccue.guava.hash.Funnels
-
Returns a funnel that extracts the characters from a
CharSequence, a character at a time, without performing any encoding.
W
- write(byte[], int, int) - Method in class dev.mccue.guava.hash.HashingOutputStream
- write(int) - Method in class dev.mccue.guava.hash.HashingOutputStream
- writeBytesTo(byte[], int, int) - Method in class dev.mccue.guava.hash.HashCode
-
Copies bytes from this hash code into
dest. - writeTo(OutputStream) - Method in class dev.mccue.guava.hash.BloomFilter
-
Writes this
BloomFilterto an output stream, with a custom format (not Java serialization).
All Classes and Interfaces|All Packages|Serialized Form
Predicateinterface; useBloomFilter.mightContain(T)instead.