public interface CountingBloomFilter<T> extends BloomFilter<T>
Modifier and Type | Method and Description |
---|---|
default boolean |
add(byte[] element)
Adds the passed value to the filter.
|
long |
addAndEstimateCount(byte[] element)
Adds an element and returns its estimated frequency after the insertion (i.e. the number of times the element was
added to the filter).
|
default long |
addAndEstimateCount(T element)
Adds an element and returns its estimated frequency after the insertion (i.e. the number of times the element was
added to the filter).
|
CountingBloomFilter<T> |
clone()
Constructs a deep copy of the Bloom filter
|
default int |
getCountingBits() |
long |
getEstimatedCount(T element)
Return the estimated count for an element using the Mininum Selection algorithm (i.e. by choosing the minimum
counter for the given element).
|
default boolean |
remove(byte[] element)
Removes the object from the counting bloom filter.
|
default boolean |
remove(T element)
Removes the object from the counting bloom filter.
|
default java.util.List<java.lang.Boolean> |
removeAll(java.util.Collection<T> elements)
Removes the objects from the counting bloom filter.
|
long |
removeAndEstimateCount(byte[] element)
Removes an element and returns its estimated frequency after the insertion (i.e. the number of times the element
was added to the filter).
|
default long |
removeAndEstimateCount(T element)
Removes an element and returns its estimated frequency after the insertion (i.e. the number of times the element
was added to the filter).
|
add, addAll, asString, clear, compatible, compatible, config, contains, contains, contains, containsAll, getBitSet, getBitsPerElement, getBitZeroProbability, getEstimatedFalsePositiveProbability, getEstimatedPopulation, getExpectedElements, getFalsePositiveProbability, getFalsePositiveProbability, getHashes, getSize, hash, hash, intersect, isEmpty, population, remove, toBytes, union
default int getCountingBits()
default boolean add(byte[] element)
BloomFilter
add
in interface BloomFilter<T>
element
- value to addtrue
if the value did not previously exist in the filter. Note, that a false positive may occur,
thus the value may not have already been in the filter, but it hashed to a set of bits already in the filter.default boolean remove(byte[] element)
element
- object to be deletedtrue
if the element is not present after removaldefault boolean remove(T element)
element
- object to be deletedtrue
if the element is not present after removaldefault java.util.List<java.lang.Boolean> removeAll(java.util.Collection<T> elements)
elements
- objects to be deletedlong getEstimatedCount(T element)
element
- element to querylong addAndEstimateCount(byte[] element)
element
- element to adddefault long addAndEstimateCount(T element)
element
- element to addlong removeAndEstimateCount(byte[] element)
element
- element to removedefault long removeAndEstimateCount(T element)
element
- element to removeCountingBloomFilter<T> clone()
BloomFilter
clone
in interface BloomFilter<T>