public interface BloomFilter
Modifier and Type | Method and Description |
---|---|
boolean |
add(CharSequence s)
Adds a character sequence to the filter.
|
boolean |
contains(CharSequence s)
Checks whether the given character sequence is in this filter.
|
boolean |
getBit(long bitIndex) |
long |
getExpectedInserts()
Report the number of expected inserts used at instantiation time to
calculate the bitfield size.
|
long |
getHashCount()
Report the number of internal independent hash function (and thus the
number of bits set/checked for each item presented).
|
long |
getSizeBytes()
The amount of memory in bytes consumed by the bloom
bitfield.
|
int |
size()
The number of character sequences in the filter (considered to be the
number of add()s that returned 'true')
|
int size()
contains(CharSequence)
).boolean contains(CharSequence s)
Note that this method may return true on a character sequence that is has not been added to the filter. This will happen with probability 2-d, where d is the number of hash functions specified at creation time, if the number of the elements in the filter is less than n, the number of expected elements specified at creation time.
s
- a character sequence.boolean add(CharSequence s)
s
- a character sequence.contains(CharSequence)
).long getSizeBytes()
long getExpectedInserts()
long getHashCount()
boolean getBit(long bitIndex)
Copyright © 2003-2014 Internet Archive. All Rights Reserved.