Exemplo n.º 1
0
 /**
  * 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 ArgumentException("BloomFilters are not compatible for merging." +
             " this - " + this.ToString() + " that - " + that.ToString());
     }
 }
Exemplo n.º 2
0
 /**
  * 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 ArgumentException("BloomFilters are not compatible for merging." +
                                     " this - " + this.ToString() + " that - " + that.ToString());
     }
 }