From 092959ddcb73ec1fc761217a1c59c1ae0e24e2e7 Mon Sep 17 00:00:00 2001 From: dota17 Date: Wed, 25 Mar 2020 19:26:58 +0800 Subject: [PATCH] Fixtypo for the bloomFilter --- .../commons/collections4/bloomfilter/BitSetBloomFilter.java | 2 +- .../collections4/bloomfilter/AbstractBloomFilterTest.java | 4 ++-- .../commons/collections4/bloomfilter/hasher/ShapeTest.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java index c03835e4e..e948d334e 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java @@ -32,7 +32,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher; public class BitSetBloomFilter extends AbstractBloomFilter { /** - * The bitset that defines this BloomFilter. + * The bitSet that defines this BloomFilter. */ private final BitSet bitSet; diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java index 6af124515..448add155 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java @@ -446,7 +446,7 @@ public abstract class AbstractBloomFilterTest { * Tests that merging bloom filters works as expected with a generic BloomFilter. */ @Test - public final void mergeTest_GenenicBloomFilter() { + public final void mergeTest_GenericBloomFilter() { mergeTest_BloomFilter(this::createGenericFilter); } @@ -598,7 +598,7 @@ public abstract class AbstractBloomFilterTest { * Tests that the xorCardinality calculations are correct with a generic BloomFilter. */ @Test - public final void xorCardinalityTest_GenenicBloomFilter() { + public final void xorCardinalityTest_GenericBloomFilter() { xorCardinalityTest(this::createGenericFilter); } diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java index af7f0b19e..35edb1a87 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java @@ -88,7 +88,7 @@ public class ShapeTest { } /** - * Tests that if the number of hash functions is less than 1 an exception is thrown. + * Tests that if the number of hash functions is less than 1 an IllegalArgumentException is thrown. */ @Test public void constructor_items_bits_BadNumberOfHashFunctionsTest() { @@ -212,7 +212,7 @@ public class ShapeTest { } /** - * Tests that if the probability is less than or equal to 0 an IllegalArgumentException is thrown. + * Tests that if the probability is less than or equal to 0 or more than or equal to 1 an IllegalArgumentException is thrown. */ @Test public void constructor_items_probability_BadProbabilityTest() { @@ -392,7 +392,7 @@ public class ShapeTest { @Test public void constructor_probability_bits_hashTest() { /* - * values from https://hur.st/bloomfilter/?n=5&p=.1&m=&k= + * values from https://hur.st/bloomfilter/?n=5&p=.1&m=24&k=3 */ final Shape filterConfig = new Shape(testFunction, 0.1, 24, 3);