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. |
static <T> Collector<T,?,BloomFilter<T>> |
BloomFilter.toBloomFilter(Funnel<? super T> funnel,
long expectedInsertions)
Returns a
Collector expecting the specified number of insertions, and yielding a BloomFilter with false positive probability 3%. |
static <T> Collector<T,?,BloomFilter<T>> |
BloomFilter.toBloomFilter(Funnel<? super T> funnel,
long expectedInsertions,
double fpp)
Returns a
Collector expecting the specified number of insertions, and yielding a BloomFilter with the specified expected false positive probability. |
Copyright © 2010–2017. All rights reserved.