@Deprecated
@Beta
public final class SimpleBloomFilter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static SimpleBloomFilter |
create(int expectedInsertions)
Deprecated.
Creates a
Builder of a SimpleBloomFilter , with the expected number of insertions, and a
default expected false positive probability of 3%. |
static SimpleBloomFilter |
create(int expectedInsertions,
double fpp)
Deprecated.
|
long |
hashString(java.lang.CharSequence input)
Deprecated.
|
boolean |
mightContain(java.lang.String object)
Deprecated.
Returns
true if the element might have been put in this Bloom filter, false if this is
definitely not the case. |
boolean |
put(java.lang.String object)
Deprecated.
Puts an element into this
BloomFilter . |
public boolean mightContain(java.lang.String object)
true
if the element might have been put in this Bloom filter, false
if this is
definitely not the case.public boolean put(java.lang.String object)
BloomFilter
. Ensures that subsequent invocations of
mightContain(String)
with the same element will always return true
.object
has been added to the filter. If the bits haven't
changed, this might be the first time object
has been added to the filter. Note that
put(t)
always returns the opposite result to what mightContain(t)
would have
returned at the time it is called."public static SimpleBloomFilter create(int expectedInsertions, double fpp)
public static SimpleBloomFilter create(int expectedInsertions)
Builder
of a SimpleBloomFilter
, with the expected number of insertions, and a
default expected false positive probability of 3%.
Note that overflowing a SimpleBloomFilter
with significantly more elements than specified, will result in its
saturation, and a sharp deterioration of its false positive probability.
The constructed SimpleBloomFilter<T>
will be serializable if the provided Funnel<T>
is.
expectedInsertions
- the number of expected insertions to the constructed SimpleBloomFilter<T>
; must be positiveSimpleBloomFilter
public long hashString(java.lang.CharSequence input)