create
Creates a BloomFilter with the expected number of insertions and expected false positive probability.
Note that overflowing a BloomFilter with significantly more elements than specified, will result in its saturation, and a sharp deterioration of its false positive probability.
The constructed BloomFilter will be serializable if the provided Funnel is.
It is recommended that the funnel be implemented as a Java enum. This has the benefit of ensuring proper serialization and deserialization, which is important since equals also relies on object identity of funnels.
Return
Parameters
the funnel of T's that the constructed BloomFilter will use
the number of expected insertions to the constructed BloomFilter; must be positive
the desired false positive probability (must be positive and less than 1.0)
See also
int, double)">com.google.common.hash.BloomFilter#create(com.google.common.hash.Funnel, int, double)
Creates a BloomFilter with the expected number of insertions and a default expected false positive probability of 3%.
Note that overflowing a BloomFilter with significantly more objects than specified, will result in its saturation, and a sharp deterioration of its false positive probability.
The constructed BloomFilter will be serializable if the provided Funnel<T>
is.
It is recommended that the funnel be implemented as a Java enum. This has the benefit of ensuring proper serialization and deserialization, which is important since equals also relies on object identity of funnels.
Return
Parameters
the funnel of T's that the constructed BloomFilter will use
the number of expected insertions to the constructed BloomFilter; must be positive
See also
int)">com.google.common.hash.BloomFilter#create(com.google.common.hash.Funnel, int)