code: public static BloomFilter create(long expectedNumItems, long numBits) {
      if (expectedNumItems <= 0) {
        throw new IllegalArgumentException("Expected insertions must be positive");
      }
  
      if (numBits <= 0) {
        throw new IllegalArgumentException("Number of bits must be positive");
      }
  
      return new BloomFilterImpl(optimalNumOfHashFunctions(expectedNumItems, numBits), numBits);
    }
docs: Creates a {@link BloomFilter} with given {@code expectedNumItems} and {@code numBits}, it will
  pick an optimal {@code numHashFunctions} which can minimize {@code fpp} for the bloom filter.