code: public static IFilter getFilter(long numElements, double maxFalsePosProbability, boolean offheap)
      {
          assert maxFalsePosProbability <= 1.0 : "Invalid probability";
          if (maxFalsePosProbability == 1.0)
              return new AlwaysPresentFilter();
          int bucketsPerElement = BloomCalculations.maxBucketsPerElement(numElements);
          BloomCalculations.BloomSpecification spec = BloomCalculations.computeBloomSpec(bucketsPerElement, maxFalsePosProbability);
          return createFilter(spec.K, numElements, spec.bucketsPerElement, offheap);
      }
docs: @return 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.