|
||||||||||
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. |
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') |
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()
long getExpectedInserts()
long getHashCount()
boolean getBit(long bitIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |