@Test public void testGetAndSetInvalidFpp() { final double invalidFpp = ThreadLocalRandom.current().nextDouble(1, Long.MAX_VALUE); final TestingBloomFilterConfig config = new TestingBloomFilterConfig(); assertThatThrownBy(() -> config.setFpp(invalidFpp)) .isInstanceOf(BadParameterException.class) .hasMessageContaining("invalid parameter"); }
@SuppressWarnings("unchecked") @Override public T setFpp(double fpp) { checkParameter("fpp", fpp > 0.0d && fpp < 1.0d, "expected: > 0 && < 1, actual: %s", fpp); this.fpp = fpp; return self(); }
AbstractBloomFilterConfig implements BloomFilterConfig<T>, Cloneable { @SuppressWarnings("unchecked") @Override public T setFpp(double fpp) { checkParameter("fpp", fpp > 0.0d && fpp < 1.0d, "expected: > 0 && < 1, actual: %s", fpp); this.fpp = fpp; return self(); } }
AbstractBloomFilterConfig implements BloomFilterConfig<T>, Cloneable { @SuppressWarnings("unchecked") @Override public T setFpp(double fpp) { checkParameter("fpp", fpp > 0.0d && fpp < 1.0d, "expected: > 0 && < 1, actual: %s", fpp); this.fpp = fpp; return self(); } AbstractBloomFilterConfig();   AbstractBloomFilterConfig(int expectedInsertions, double fpp); }
AbstractBloomFilterConfig implements BloomFilterConfig<T>, Cloneable { @SuppressWarnings("unchecked") @Override public T setFpp(double fpp) { checkParameter("fpp", fpp > 0.0d && fpp < 1.0d, "expected: > 0 && < 1, actual: %s", fpp); this.fpp = fpp; return self(); } AbstractBloomFilterConfig();   AbstractBloomFilterConfig(int expectedInsertions, double fpp); int expectedInsertions(); double fpp(); @SuppressWarnings("unchecked") @Override T setExpectedInsertions(int expectedInsertions); @SuppressWarnings("unchecked") @Override T setFpp(double fpp); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
AbstractBloomFilterConfig implements BloomFilterConfig<T>, Cloneable { @SuppressWarnings("unchecked") @Override public T setFpp(double fpp) { checkParameter("fpp", fpp > 0.0d && fpp < 1.0d, "expected: > 0 && < 1, actual: %s", fpp); this.fpp = fpp; return self(); } AbstractBloomFilterConfig();   AbstractBloomFilterConfig(int expectedInsertions, double fpp); int expectedInsertions(); double fpp(); @SuppressWarnings("unchecked") @Override T setExpectedInsertions(int expectedInsertions); @SuppressWarnings("unchecked") @Override T setFpp(double fpp); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }