Class FastFilter
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.membership.bloom.FastFilter
-
- All Implemented Interfaces:
Membership
public final class FastFilter extends Object implements Membership
An adapter to FastFilter implementations.
-
-
Constructor Summary
Constructors Constructor Description FastFilter(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes the elements from this collection.booleanmightContain(long e)Returns if the element might have been put in this Bloom filter,falseif this is definitely not the case.booleanput(long e)Puts an element into this collection so that subsequent queries with the same element will returntrue.
-
-
-
Constructor Detail
-
FastFilter
public FastFilter(Config config)
-
-
Method Detail
-
mightContain
public boolean mightContain(long e)
Description copied from interface:MembershipReturns if the element might have been put in this Bloom filter,falseif this is definitely not the case.- Specified by:
mightContainin interfaceMembership- Parameters:
e- the element whose presence is to be tested- Returns:
- if the element might be present
-
clear
public void clear()
Description copied from interface:MembershipRemoves the elements from this collection.- Specified by:
clearin interfaceMembership
-
put
public boolean put(long e)
Description copied from interface:MembershipPuts an element into this collection so that subsequent queries with the same element will returntrue.- Specified by:
putin interfaceMembership- Parameters:
e- the element to add- Returns:
- if the membership changed as a result of this operation
-
-