public synchronized void merge ( BloomFilter filter ) { if ( ! this . matchesAll ( ) && ! filter . matchesAll ( ) ) { checkArgument ( filter . data . length == this . data . length && filter . hashFuncs == this . hashFuncs && filter . nTweak == this . nTweak ) ; for ( int i = 0 ; i < data . length ; i ++ ) this . data [ i ] |= filter . data [ i ] ; } else { this . data = new byte [ ] { ( byte ) 0xff } ; } }
Copies filter into this . Filter must have the same size hash function count and nTweak or an IllegalArgumentException will be thrown .