BloomFilterImpl is a BloomFilter.
BloomFilterImpl takes the following to be created:
- Number of bits (to create a
BloomFilterImpl is created when:
BloomFilteris requested to create a BloomFilter
mightContainLong is part of the BloomFilter abstraction.
Murmur3_x86_32 to generate two hashes of the given
item with two different seeds:
0 and the hash result of the first hashing.
mightContainLong requests the BitArray for the number of bits (
In the end,
mightContainLong checks out if the bit for the hashes (combined) is set (non-zero) in the BitArray up to numHashFunctions times. With all the bits checked and set,
mightContainLong is positive. Otherwise,
mightContainLong is negative.