Class FilterFactory


  • public class FilterFactory
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FilterFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IFilter getFilter​(long numElements, double maxFalsePosProbability)  
      static IFilter getFilter​(long numElements, int targetBucketsPerElem)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • AlwaysPresent

        public static final IFilter AlwaysPresent
    • Constructor Detail

      • FilterFactory

        public FilterFactory()
    • Method Detail

      • getFilter

        public static IFilter getFilter​(long numElements,
                                        int targetBucketsPerElem)
        Returns:
        A BloomFilter with the lowest practical false positive probability for the given number of elements.
      • getFilter

        public static IFilter getFilter​(long numElements,
                                        double maxFalsePosProbability)
        Returns:
        The smallest BloomFilter that can provide the given false positive probability rate for the given number of elements. Asserts that the given probability can be satisfied using this filter.