|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BloomFilter
Common interface for different Bloom filter implementations
Method Summary | |
---|---|
boolean |
add(java.lang.CharSequence s)
Adds a character sequence to the filter. |
boolean |
contains(java.lang.CharSequence s)
Checks whether the given character sequence is in this filter. |
long |
getSizeBytes()
The amount of memory in bytes consumed by the bloom bitfield. |
int |
size()
The number of character sequences in the filter. |
Method Detail |
---|
int size()
contains(CharSequence)
).boolean contains(java.lang.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(java.lang.CharSequence s)
s
- a character sequence.
contains(CharSequence)
).long getSizeBytes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |