func (f *BloomFilter) TestAndAdd(data []byte) bool {
	present := true
	indexes := f.indexes(data)
	for i := uint(0); i < f.hashCount; i++ {
		if !f.b.Test(uint(indexes[i])) {
			present = false
		}
		f.b.Set(uint(indexes[i]))
	}

	return present
}
// TestAndAdd is the equivalent to calling Test(data) then Add(data).
// Returns the result of Test.
TestAndAdd is the equivalent to calling Test(data) then Add(data).
Returns the result of Test.
// TestAndAdd is the equivalent to calling Test ( data ) then Add ( data ) . // Returns the result of Test .
func (f *BloomFilter) TestAndAdd(data []byte) bool {
	present := true
	indexes := f.indexes(data)
	for i := uint(0); i < f.hashCount; i++ {
		if !f.b.Test(uint(indexes[i])) {
			present = false
		}
		f.b.Set(uint(indexes[i]))
	}
	return present
}
func ( f * BloomFilter ) TestAndAdd ( data [ ] byte ) bool { present := true indexes := f . indexes ( data ) for i := uint ( 0 ) ; i < f . hashCount ; i ++ { if ! f . b . Test ( uint ( indexes [ i ] ) ) { present = false } f . b . Set ( uint ( indexes [ i ] ) ) } return present }
TestAndAdd is the equivalent to calling Test(data) then Add(data).
TestAndAdd is the equivalent to calling Test ( data ) then Add ( data ) .