@Test public void testMerge() { Bloom1Filter bf = new Bloom1Filter(10000); String val = "bloo"; String val1 = "bloom fil"; String val2 = "bloom filter"; String val3 = "cuckoo filter"; bf.addString(val); bf.addString(val1); bf.addString(val2); bf.addString(val3); Bloom1Filter bf2 = new Bloom1Filter(10000); String v = "2_bloo"; String v1 = "2_bloom fil"; String v2 = "2_bloom filter"; String v3 = "2_cuckoo filter"; bf2.addString(v); bf2.addString(v1); bf2.addString(v2); bf2.addString(v3); assertEquals(true, bf.testString(val)); assertEquals(true, bf.testString(val1)); assertEquals(true, bf.testString(val2)); assertEquals(true, bf.testString(val3)); assertEquals(false, bf.testString(v)); assertEquals(false, bf.testString(v1)); assertEquals(false, bf.testString(v2)); assertEquals(false, bf.testString(v3)); bf.merge(bf2); assertEquals(true, bf.testString(val)); assertEquals(true, bf.testString(val1)); assertEquals(true, bf.testString(val2)); assertEquals(true, bf.testString(val3)); assertEquals(true, bf.testString(v)); assertEquals(true, bf.testString(v1)); assertEquals(true, bf.testString(v2)); assertEquals(true, bf.testString(v3)); }
public void merge(Bloom1Filter that) { this.bitSet.putAll(that.bitSet); }
Bloom1Filter { public void merge(Bloom1Filter that) { this.bitSet.putAll(that.bitSet); } }
Bloom1Filter { public void merge(Bloom1Filter that) { this.bitSet.putAll(that.bitSet); } Bloom1Filter(long maxNumEntries);  Bloom1Filter(long maxNumEntries, double fpp);  Bloom1Filter(List<Long> serializedBloom); }
Bloom1Filter { public void merge(Bloom1Filter that) { this.bitSet.putAll(that.bitSet); } Bloom1Filter(long maxNumEntries);  Bloom1Filter(long maxNumEntries, double fpp);  Bloom1Filter(List<Long> serializedBloom); long sizeInBytes(); void add(byte[] val); void addBytes(byte[] val); void addString(String val); void addByte(byte val); void addInt(int val); void addLong(long val); void addFloat(float val); void addDouble(double val); boolean test(byte[] val); boolean testBytes(byte[] val); boolean testString(String val); boolean testByte(byte val); boolean testInt(int val); boolean testLong(long val); boolean testFloat(float val); boolean testDouble(double val); long getBitSize(); int getNumHashFunctions(); double getFalsePositivePercent(); long getExpectedNumEntries(); List<Long> serialize(); boolean isCompatible(Bloom1Filter that); void merge(Bloom1Filter that); }
Bloom1Filter { public void merge(Bloom1Filter that) { this.bitSet.putAll(that.bitSet); } Bloom1Filter(long maxNumEntries);  Bloom1Filter(long maxNumEntries, double fpp);  Bloom1Filter(List<Long> serializedBloom); long sizeInBytes(); void add(byte[] val); void addBytes(byte[] val); void addString(String val); void addByte(byte val); void addInt(int val); void addLong(long val); void addFloat(float val); void addDouble(double val); boolean test(byte[] val); boolean testBytes(byte[] val); boolean testString(String val); boolean testByte(byte val); boolean testInt(int val); boolean testLong(long val); boolean testFloat(float val); boolean testDouble(double val); long getBitSize(); int getNumHashFunctions(); double getFalsePositivePercent(); long getExpectedNumEntries(); List<Long> serialize(); boolean isCompatible(Bloom1Filter that); void merge(Bloom1Filter that);  }