You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/11/07 13:39:55 UTC

[commons-collections] branch master updated: Javadocs and comments

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


The following commit(s) were added to refs/heads/master by this push:
     new fd09ecccb Javadocs and comments
     new 9bbfad5db Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-collections.git
fd09ecccb is described below

commit fd09ecccbdfd1beaf372deeed956df2a61b814ff
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Nov 7 08:39:21 2022 -0500

    Javadocs and comments
    
    Normalize spelling to "behavior"
---
 .../collections4/bloomfilter/EnhancedDoubleHasher.java   |  2 +-
 .../bloomfilter/AbstractBitCountProducerTest.java        |  8 ++++----
 .../bloomfilter/AbstractIndexProducerTest.java           | 16 ++++++++--------
 .../bloomfilter/DefaultBitCountProducerTest.java         |  2 +-
 .../collections4/collection/AbstractCollectionTest.java  | 10 +++++-----
 .../apache/commons/collections4/map/AbstractMapTest.java |  8 ++++----
 .../multimap/AbstractMultiValuedMapTest.java             |  6 +++---
 7 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/EnhancedDoubleHasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/EnhancedDoubleHasher.java
index 14b41869b..056c16379 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/EnhancedDoubleHasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/EnhancedDoubleHasher.java
@@ -36,7 +36,7 @@ import java.util.function.IntPredicate;
  * all items, hashing may not create indices that fill the full region within a much larger filter. Imagine hashers created with {@code initial}
  * and {@code increment} values less than 255 with a filter size of 30000 and number of hash functions as 5. Ignoring the
  * tetrahedral addition (a maximum of 20 for k=5) the max index is 255 * 4 + 255 = 1275, this covers 4.25% of the filter. This also
- * ignores the negative wrapping but the behaviour is the same, some bits cannot be reached.
+ * ignores the negative wrapping but the behavior is the same, some bits cannot be reached.
  * </p><p>
  * So this needs to be avoided as the filter probability assumptions will be void. If the {@code initial} and {@code increment} are larger
  * than the number of bits then the modulus will create a 'random' position and increment within the size.
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java
index 795bed327..7488e428d 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java
@@ -67,9 +67,9 @@ public abstract class AbstractBitCountProducerTest extends AbstractIndexProducer
     protected abstract BitCountProducer createEmptyProducer();
 
     /**
-     * Gets the behaviour of the {@link BitCountProducer#forEachCount(BitCountConsumer)} method.
+     * Gets the behavior of the {@link BitCountProducer#forEachCount(BitCountConsumer)} method.
      * By default returns the value of {@code getAsIndexArrayBehaviour()} method.
-     * @return the behaviour.
+     * @return the behavior.
      */
     protected int getForEachCountBehaviour() {
         return getAsIndexArrayBehaviour();
@@ -129,8 +129,8 @@ public abstract class AbstractBitCountProducerTest extends AbstractIndexProducer
     }
 
     /**
-     * Test the behaviour of {@link BitCountProducer#forEachCount(BitCountConsumer)} with respect
-     * to ordered and distinct indices. Currently the behaviour is assumed to be the same as
+     * Test the behavior of {@link BitCountProducer#forEachCount(BitCountConsumer)} with respect
+     * to ordered and distinct indices. Currently the behavior is assumed to be the same as
      * {@link IndexProducer#forEachIndex(java.util.function.IntPredicate)}.
      */
     @Test
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractIndexProducerTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractIndexProducerTest.java
index 1d585ed7b..38ce388bd 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractIndexProducerTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractIndexProducerTest.java
@@ -82,17 +82,17 @@ public abstract class AbstractIndexProducerTest {
     protected abstract IndexProducer createEmptyProducer();
 
     /**
-     * Gets the behaviour of the {@link IndexProducer#asIndexArray()} method.
-     * @return the behaviour.
+     * Gets the behavior of the {@link IndexProducer#asIndexArray()} method.
+     * @return the behavior.
      * @see #ORDERED
      * @see #DISTINCT
      */
     protected abstract int getAsIndexArrayBehaviour();
 
     /**
-     * Gets the behaviour of the {@link IndexProducer#forEachIndex(IntPredicate)} method.
+     * Gets the behavior of the {@link IndexProducer#forEachIndex(IntPredicate)} method.
      * By default returns the value of {@code getAsIndexArrayBehaviour()} method.
-     * @return the behaviour.
+     * @return the behavior.
      * @see #ORDERED
      * @see #DISTINCT
      */
@@ -173,8 +173,8 @@ public abstract class AbstractIndexProducerTest {
     }
 
     /**
-     * Tests the behaviour of {@code IndexProducer.asIndexArray()}.
-     * The expected behaviour is defined by the {@code getBehaviour()} method.
+     * Tests the behavior of {@code IndexProducer.asIndexArray()}.
+     * The expected behavior is defined by the {@code getBehaviour()} method.
      * The index array may be Ordered, Distinct or both.
      * If the index array is not distinct then all elements returned by the {@code getExpectedIndices()}
      * method, including duplicates, are expected to be returned by the {@code asIndexArray()} method.
@@ -201,8 +201,8 @@ public abstract class AbstractIndexProducerTest {
     }
 
     /**
-     * Tests the behaviour of {@code IndexProducer.forEachIndex()}.
-     * The expected behaviour is defined by the {@code getBehaviour()} method.
+     * Tests the behavior of {@code IndexProducer.forEachIndex()}.
+     * The expected behavior is defined by the {@code getBehaviour()} method.
      * The order is assumed to follow the order produced by {@code IndexProducer.asIndexArray()}.
      */
     @Test
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBitCountProducerTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBitCountProducerTest.java
index 54a74ff51..a85b90b29 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBitCountProducerTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBitCountProducerTest.java
@@ -51,7 +51,7 @@ public class DefaultBitCountProducerTest extends AbstractBitCountProducerTest {
 
     @Override
     protected int getForEachIndexBehaviour() {
-        // The default method has the same behaviour as the forEachCount() method.
+        // The default method has the same behavior as the forEachCount() method.
         return 0;
     }
 
diff --git a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
index 84ce94ed8..05c539b57 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -73,7 +73,7 @@ import org.junit.jupiter.api.Test;
  * <p>
  * <b>Indicate Collection Behaviour</b>
  * <p>
- * Override these if your collection makes specific behaviour guarantees:
+ * Override these if your collection makes specific behavior guarantees:
  * <ul>
  * <li>{@link #getIterationBehaviour()}</li>
  * </ul>
@@ -144,7 +144,7 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
 
     /**
      * Flag to indicate the collection makes no ordering guarantees for the iterator. If this is not used
-     * then the behaviour is assumed to be ordered and the output order of the iterator is matched by
+     * then the behavior is assumed to be ordered and the output order of the iterator is matched by
      * the toArray method.
      */
     public static final int UNORDERED = 0x1;
@@ -503,11 +503,11 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
     }
 
     /**
-     * Return a flag specifying the iteration behaviour of the collection.
+     * Return a flag specifying the iteration behavior of the collection.
      * This is used to change the assertions used by specific tests.
-     * The default implementation returns 0 which indicates ordered iteration behaviour.
+     * The default implementation returns 0 which indicates ordered iteration behavior.
      *
-     * @return the iteration behaviour
+     * @return the iteration behavior
      * @see #UNORDERED
      */
     protected int getIterationBehaviour(){
diff --git a/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java b/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
index 2ac4b064d..0f2806923 100644
--- a/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
@@ -65,7 +65,7 @@ import org.junit.jupiter.api.Test;
  *
  * <b>Indicate Map Behaviour</b>
  * <p>
- * Override these if your map makes specific behaviour guarantees:
+ * Override these if your map makes specific behavior guarantees:
  * <ul>
  * <li>{@link #getIterationBehaviour()}</li>
  * </ul>
@@ -532,11 +532,11 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
     }
 
     /**
-     * Return a flag specifying the iteration behaviour of the collection.
+     * Return a flag specifying the iteration behavior of the collection.
      * This is used to change the assertions used by specific tests.
-     * The default implementation returns 0 which indicates ordered iteration behaviour.
+     * The default implementation returns 0 which indicates ordered iteration behavior.
      *
-     * @return the iteration behaviour
+     * @return the iteration behavior
      * @see AbstractCollectionTest#UNORDERED
      */
     protected int getIterationBehaviour(){
diff --git a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
index b7f4578f3..25d29bd41 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
@@ -213,11 +213,11 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
     }
 
     /**
-     * Return a flag specifying the iteration behaviour of the map.
+     * Return a flag specifying the iteration behavior of the map.
      * This is used to change the assertions used by specific tests.
-     * The default implementation returns 0 which indicates ordered iteration behaviour.
+     * The default implementation returns 0 which indicates ordered iteration behavior.
      *
-     * @return the iteration behaviour
+     * @return the iteration behavior
      * @see AbstractCollectionTest#UNORDERED
      */
     protected int getIterationBehaviour() {