Equivalent to #mightContain
; provided only to satisfy the Predicate
interface.
Equivalent to #mightContain
; provided only to satisfy the Predicate
interface.
When using a reference of type BloomFilter
, always invoke #mightContain
directly instead.
Creates a new BloomFilter
that's a copy of this instance.
Creates a new BloomFilter
that's a copy of this instance. The new instance is equal to
this instance but shares no mutable state.
Returns the probability that #mightContain(T)
will erroneously return
true
for an object that has not actually been put in the BloomFilter
.
Returns the probability that #mightContain(T)
will erroneously return
true
for an object that has not actually been put in the BloomFilter
.
Ideally, this number should be close to the fpp
parameter
passed in #create(Integer, Double)
, or smaller. If it is
significantly higher, it is usually the case that too many elements (more than
expected) have been put in the BloomFilter
, degenerating it.
Returns true
if the element might have been put in this Bloom filter,
false
if this is definitely not the case.
Returns true
if the element might have been put in this Bloom filter,
false
if this is definitely not the case.
Puts an element into this BloomFilter
.
Puts an element into this BloomFilter
. Ensures that subsequent invocations of
#mightContain(T)
with the same element will always return true
.
true if the bloom filter's bits changed as a result of this operation. If the bits
changed, this is definitely the first time 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."
A Bloom filter for instances of
T
. A Bloom filter offers an approximate containment test with one-sided error: if it claims that an element is contained in it, this might be in error, but if it claims that an element is not contained in it, then this is definitely true.From the Guava BloomFilter tutorial:
The false positive probability (
FPP
) of a bloom filter is defined as the probability that#mightContain(T)
will erroneously returntrue
for an object that has not actually been put in theBloomFilter
.0.6 (copied from Guava-libraries)