Java-BloomFilter
Java-BloomFilter copied to clipboard
Request: "getAndAdd" method
For iterating through huge lists with duplicates and using the bloom filter to make sure each use of an item from the list is only done once, it might speed things up to have a combined containsAndAdd method to avoid hanging to hash the same input twice.
if (myBloom.contains(itemFromList)) {
return;
}
myBloom.add(itemFromList);
//... do things ...