Interface Membership
-
- All Known Implementing Classes:
BloomFilter,FastFilter,GuavaBloomFilter
public interface MembershipA probabilistic set for testing the membership of an element.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Removes the elements from this collection.static Membershipdisabled()Returns an instance that contains nothing.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.
-
-
-
Method Detail
-
mightContain
boolean mightContain(long e)
Returns if the element might have been put in this Bloom filter,falseif this is definitely not the case.- Parameters:
e- the element whose presence is to be tested- Returns:
- if the element might be present
-
clear
void clear()
Removes the elements from this collection.
-
put
@CanIgnoreReturnValue boolean put(long e)
Puts an element into this collection so that subsequent queries with the same element will returntrue.- Parameters:
e- the element to add- Returns:
- if the membership changed as a result of this operation
-
disabled
static Membership disabled()
Returns an instance that contains nothing.
-
-