isCompatible

public boolean isCompatible(@NotNull() @NotNull() ProbabilisticFilter<E> f)

Returns true if the specified filter is compatible with this filter. f is considered compatible if this filter can use it in combinatoric operations (e.g. addAll, containsAll).

For two bloom filters to be compatible, they must:

  • not be the same instance
  • have the same number of hash functions
  • have the same bit size
  • have the same strategy
  • have equal funnels

Return

true if the specified filter is compatible with this filter

Parameters

f

filter to check for compatibility with this filter

See also

<a target="guavadoc" href="http://google.github.io/guava/releases/snapshot/api/docs/com/google/common/hash/BloomFilter.html#isCompatible(com.google.common.hash.BloomFilter)">com.google.common.hash.BloomFilter#isCompatible(com.google.common.hash.BloomFilter)</a>

Throws

if the specified filter is null