Package | Description |
---|---|
com.google.common.hash |
Hash functions and related structures.
|
Modifier and Type | Method and Description |
---|---|
static Funnel<byte[]> |
Funnels.byteArrayFunnel()
Returns a funnel that extracts the bytes from a
byte array. |
static Funnel<Integer> |
Funnels.integerFunnel()
Returns a funnel for integers.
|
static Funnel<Long> |
Funnels.longFunnel()
Returns a funnel for longs.
|
static <E> Funnel<Iterable<? extends E>> |
Funnels.sequentialFunnel(Funnel<E> elementFunnel)
Returns a funnel that processes an
Iterable by funneling its elements in iteration
order with the specified funnel. |
static Funnel<CharSequence> |
Funnels.stringFunnel(Charset charset)
Returns a funnel that encodes the characters of a
CharSequence with the specified
Charset . |
static Funnel<CharSequence> |
Funnels.unencodedCharsFunnel()
Returns a funnel that extracts the characters from a
CharSequence , a character at a
time, without performing any encoding. |
Modifier and Type | Method and Description |
---|---|
static <T> BloomFilter<T> |
BloomFilter.create(Funnel<? super T> funnel,
int expectedInsertions)
Creates a
BloomFilter with the expected number of insertions and a default expected
false positive probability of 3%. |
static <T> BloomFilter<T> |
BloomFilter.create(Funnel<? super T> funnel,
int expectedInsertions,
double fpp)
Creates a
BloomFilter with the expected number of insertions and expected false
positive probability. |
static <T> BloomFilter<T> |
BloomFilter.create(Funnel<? super T> funnel,
long expectedInsertions)
Creates a
BloomFilter with the expected number of insertions and a default expected
false positive probability of 3%. |
static <T> BloomFilter<T> |
BloomFilter.create(Funnel<? super T> funnel,
long expectedInsertions,
double fpp)
Creates a
BloomFilter with the expected number of insertions and expected false
positive probability. |
<T> HashCode |
HashFunction.hashObject(T instance,
Funnel<? super T> funnel)
Shortcut for
newHasher().putObject(instance, funnel).hash() . |
<T> Hasher |
Hasher.putObject(T instance,
Funnel<? super T> funnel)
A simple convenience for
funnel.funnel(object, this) . |
static <T> BloomFilter<T> |
BloomFilter.readFrom(InputStream in,
Funnel<? super T> funnel)
Reads a byte stream, which was written by BloomFilter.writeTo(OutputStream), into a
BloomFilter . |
static <E> Funnel<Iterable<? extends E>> |
Funnels.sequentialFunnel(Funnel<E> elementFunnel)
Returns a funnel that processes an
Iterable by funneling its elements in iteration
order with the specified funnel. |
Copyright © 2010–2019. All rights reserved.