/** * Merge the specified bloom filter with current bloom filter. * * @param that - bloom filter to merge */ public void merge(BloomFilter that) { if (this != that && this.numBits == that.numBits && this.numHashFunctions == that.numHashFunctions) { this.bitSet.putAll(that.bitSet); } else { throw new IllegalArgumentException("BloomFilters are not compatible for merging." + " this - " + this.toString() + " that - " + that.toString()); } }
/** * Merge the specified bloom filter with current bloom filter. * * @param that - bloom filter to merge */ public void merge(BloomFilter that) { if (this != that && this.numBits == that.numBits && this.numHashFunctions == that.numHashFunctions) { this.bitSet.putAll(that.bitSet); } else { throw new IllegalArgumentException("BloomFilters are not compatible for merging." + " this - " + this.toString() + " that - " + that.toString()); } }
/** * Merge the specified bloom filter with current bloom filter. * * @param that - bloom filter to merge */ public void merge(BloomFilter that) { if (this != that && this.numBits == that.numBits && this.numHashFunctions == that.numHashFunctions) { this.bitSet.putAll(that.bitSet); } else { throw new IllegalArgumentException("BloomFilters are not compatible for merging." + " this - " + this.toString() + " that - " + that.toString()); } }