From 2c314e01706b5ebd2424e28ba4f04a4db210f6d2 Mon Sep 17 00:00:00 2001
From: Gary Gregory
- * This list implementation utilises a tree structure internally to ensure that
+ * This list implementation utilizes a tree structure internally to ensure that
* all insertions and removals are O(log n). This provides much faster performance
* than both an {@code ArrayList} and a {@code LinkedList} where elements
* are inserted and removed repeatedly from anywhere in the list.
From 1e126b3078f40ebabc215a5cc0f24d47b0b0ddd4 Mon Sep 17 00:00:00 2001
From: Gary Gregory
* The Faedelung calculation stores a flag for both the left and right child
* to indicate if they are a child (false) or a link as in linked list (true).
+ *
* This method runs in O(n + log m) time, where m is * the size of this list and n is the size of {@code c}. + *
* * @param c the collection to be added to this list * @return {@code true} if this list changed as a result of the call From 5fbdf9222830b82447f0ad2acf935c0cae350039 Mon Sep 17 00:00:00 2001 From: Gary Gregory* Since v4.1 only closures which are considered to be safe are * Serializable. Closures considered to be unsafe for serialization are: *
** Note: This method is named to avoid clashing with diff --git a/src/main/java/org/apache/commons/collections4/FactoryUtils.java b/src/main/java/org/apache/commons/collections4/FactoryUtils.java index 74628112ee..b80c7faf56 100644 --- a/src/main/java/org/apache/commons/collections4/FactoryUtils.java +++ b/src/main/java/org/apache/commons/collections4/FactoryUtils.java @@ -25,19 +25,19 @@ * {@code FactoryUtils} provides reference implementations and utilities * for the Factory functor interface. The supplied factories are: *
* Since v4.1 only factories which are considered to be safe are * Serializable. Factories considered to be unsafe for serialization are: *
*
* The following example outputs the first 3 even numbers in the range [1, 10]
@@ -218,8 +217,8 @@ public Enumeration
* The returned iterable will traverse the elements in the following
@@ -243,8 +242,8 @@ public FluentIterable
* The returned iterable will traverse the elements in the following diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java index 0a2e1d224c..d36a1317a3 100644 --- a/src/main/java/org/apache/commons/collections4/IterableUtils.java +++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java @@ -39,10 +39,10 @@ *
** All the supplied predicates are Serializable. diff --git a/src/main/java/org/apache/commons/collections4/TransformerUtils.java b/src/main/java/org/apache/commons/collections4/TransformerUtils.java index 9fd16482ab..3b1bdceabe 100644 --- a/src/main/java/org/apache/commons/collections4/TransformerUtils.java +++ b/src/main/java/org/apache/commons/collections4/TransformerUtils.java @@ -40,31 +40,31 @@ * {@code TransformerUtils} provides reference implementations and * utilities for the Transformer functor interface. The supplied transformers are: *
* Since v4.1 only transformers which are considered to be safe are * Serializable. Transformers considered to be unsafe for serialization are: *
** The following decorators are provided in the package: *
** The following decorators are provided in the package: *
** The following implementations are provided in the package: + *
** The following decorators are provided in the package: + *
** The following key/value designs are included: + *
** The design uses two distinct modes of operation - flat and delegate. diff --git a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java index 7bb9e50f89..0882943fdb 100644 --- a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java +++ b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java @@ -50,9 +50,9 @@ * enables extra behavior to be added easily. *
** Note that {@code IdentityMap} and {@code ReferenceIdentityMap} are unsuitable diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java index dff5a199b5..b70367ca0b 100644 --- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java +++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java @@ -52,9 +52,9 @@ * The key and value can be obtained by: *
** The following implementations are provided: + *
** The following decorators are provided: + *
** The following implementations are provided in the package: + *
** The following decorators are provided in the package: + *
** The following implementations are provided in the package: + *
** The following decorators are provided in the package: + *
** The following implementations are provided in the package: + *
** The following decorators are provided in the package: + *
** The following implementations are provided in the package: + *
** The following decorators are provided in the package: + *
** The following decorators are provided: *
* The following implementations are provided in the package: + *
** The following decorators are provided: + *
*- * If the provided map is null, returns true. - *
- * - * @param map the map to check, may be null - * @return true if the map is empty or null - */ - public static boolean isEmpty(final MultiValuedMap, ?> map) { - return map == null || map.isEmpty(); - } - /** * A utility method to invert the mappings from an input MultiValuedMap * and add them to an output MultiValuedMap. Use this method to have complete @@ -192,6 +179,19 @@ M invert(MultiValuedMap extends V, ? extends K> input, M output) { return output; } + /** + * Null-safe check if the specified {@code MultiValuedMap} is empty. + *+ * If the provided map is null, returns true. + *
+ * + * @param map the map to check, may be null + * @return true if the map is empty or null + */ + public static boolean isEmpty(final MultiValuedMap, ?> map) { + return map == null || map.isEmpty(); + } + /** * Creates a {@link ListValuedMap} with an {@link java.util.ArrayList ArrayList} as * collection class to store the values mapped to a key. From 1fba2968f86adb5a140f2349b63cdce36fd63f08 Mon Sep 17 00:00:00 2001 From: Gary Gregory* This is equivalent to - * {@code {@link #subtract subtract}({@link #union union(a,b)},{@link #intersection intersection(a,b)})} + * {@code {@link #subtract subtract}({@link #union union(a, b)},{@link #intersection intersection(a, b)})} * or - * {@code {@link #union union}({@link #subtract subtract(a,b)},{@link #subtract subtract(b,a)})}. + * {@code {@link #union union}({@link #subtract subtract(a, b)},{@link #subtract subtract(b, a)})}. *
* * @param a the first collection, must not be null diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java index 343d6b1338..886a43057b 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java @@ -131,7 +131,7 @@ long[] toArray() { * arrays reimplement this method. * * - * @param other The other BitMapExtractor that provides the y values in the (x,y) pair. + * @param other The other BitMapExtractor that provides the y values in the (x, y) pair. * @param func The function to apply. * @return A LongPredicate that tests this BitMapExtractor's bitmap values in order. */ diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterExtractor.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterExtractor.java index 88a24166e1..a7e27fc0ef 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterExtractor.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterExtractor.java @@ -120,7 +120,7 @@ default BloomFilter flatten() { * instances, or references to the filters in the collection. * * - * @param other The other BloomFilterExtractor that provides the y values in the (x,y) pair. + * @param other The other BloomFilterExtractor that provides the y values in the (x, y) pair. * @param func The function to apply. * @return {@code true} if the {@code func} returned {@code true} for every pair, {@code false} otherwise. */ diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CellExtractor.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CellExtractor.java index f6c8e574fc..0334b74793 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/CellExtractor.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CellExtractor.java @@ -70,7 +70,7 @@ interface CellPredicate { *A CellExtractor that outputs the mapping [(1,2),(2,3),(3,1)] can be created from many combinations + *
A CellExtractor that outputs the mapping [(1, 2),(2, 3),(3, 1)] can be created from many combinations * of indices including:
*
* [1, 1, 2, 2, 2, 3]
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/LongBiPredicate.java b/src/main/java/org/apache/commons/collections4/bloomfilter/LongBiPredicate.java
index ff2f3b49d7..9d36ed692c 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/LongBiPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/LongBiPredicate.java
@@ -20,7 +20,7 @@
* Represents a function that accepts a two long-valued argument and produces a binary result.
* This is the long-consuming primitive specialization for {@code BiPredicate}.
*
- * This is a functional interface whose functional method is {@code test(long,long)}.
+ * This is a functional interface whose functional method is {@code test(long, long)}.
*
*
* @since 4.5.0-M1
diff --git a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
index 05fa8acabd..5916d5b74b 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
@@ -66,7 +66,7 @@ public class ComparatorChain implements Comparator, Serializable {
/**
* Constructs a ComparatorChain with no Comparators.
* You must add at least one Comparator before calling
- * the compare(Object,Object) method, or an
+ * the compare(Object, Object) method, or an
* UnsupportedOperationException is thrown
*/
public ComparatorChain() {
@@ -182,7 +182,7 @@ private void checkLocked() {
/**
* Perform comparisons on the Objects as per
- * Comparator.compare(o1,o2).
+ * Comparator.compare(o1, o2).
*
* @param o1 the first object to compare
* @param o2 the second object to compare
diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
index 19ed92d6a6..031fb650c0 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
@@ -69,7 +69,7 @@ public class IteratorChain implements Iterator {
private Iterator extends E> lastUsedIterator;
/**
- * ComparatorChain is "locked" after the first time compare(Object,Object)
+ * ComparatorChain is "locked" after the first time compare(Object, Object)
* is called
*/
private boolean isLocked;
diff --git a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
index c1756e3fa9..f75d62389a 100644
--- a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
@@ -471,9 +471,9 @@ public boolean putAll(final K key, final Collection values) {
* correctly handled.
*
* If you call this method with a normal map, each entry is
- * added using {@code put(Object,Object)}.
+ * added using {@code put(Object, Object)}.
* If you call this method with a multi map, each entry is
- * added using {@code putAll(Object,Collection)}.
+ * added using {@code putAll(Object, Collection)}.
*
*
* @param map the map to copy (either a normal or multi map)
From c4ad5f53ad36fcb249fb7683e09d6127a9484dcd Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 26 Dec 2025 16:14:42 -0500
Subject: [PATCH 12/53] Javadoc: Fix double the
---
.../apache/commons/collections4/bloomfilter/LayerManager.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java b/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java
index 1cb64ded8f..607bf0517a 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java
@@ -138,7 +138,7 @@ public static > Consumer> noCleanup() {
}
/**
- * Removes the earliest filters in the list when the the number of filters
+ * Removes the earliest filters in the list when the number of filters
* exceeds maxSize.
*
* @param Type of BloomFilter.
@@ -292,7 +292,7 @@ public static > Builder builder() {
/**
* Constructs a new instance.
*
- * @param filterSupplier the non-null supplier of new Bloom filters to add the the list
+ * @param filterSupplier the non-null supplier of new Bloom filters to add the list
* when necessary.
* @param extendCheck The non-null predicate that checks if a new filter should be
* added to the list.
From fde741e259c9b9d37664303da01524aa2ab01abc Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 27 Dec 2025 07:28:41 -0500
Subject: [PATCH 13/53] Javadoc Add missing @since
Better text
---
.../commons/collections4/MultiMapUtils.java | 28 ++++++++++---------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/MultiMapUtils.java b/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
index 82bebab7c8..226f1dc522 100644
--- a/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
+++ b/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
@@ -159,21 +159,23 @@ public static Set getValuesAsSet(final MultiValuedMap map, final
}
/**
- * A utility method to invert the mappings from an input MultiValuedMap
- * and add them to an output MultiValuedMap. Use this method to have complete
- * control of the output MultiValuedMap or when merging several inverse mappings.
- * In simple cases, consider just using the {@link MultiValuedMap#inverted()} method.
+ * Inverts the mappings from an input MultiValuedMap by adding entries to an output MultiValuedMap. The input is unchanged.
+ *
+ * Use this method to have complete control of the output MultiValuedMap or when merging several inverse mappings. In simple cases, consider using
+ * {@link MultiValuedMap#inverted()} method.
+ *
*
- * @param input take key-to-value mappings from here
- * @param output add value-to-key mappings here
- * @param the output MultiValuedMap key type
- * @param the output MultiValuedMap value type
- * @param the output MultiValuedMap with key and value types reversed compared with input
- * @return the updated output MultiValuedMap
+ * @param the input value type and output key type.
+ * @param the input key type and output value type.
+ * @param the output MultiValuedMap type where {@code K} is the key type and {@code V} is the value type.
+ * @param input The input key-value mappings of type {@code }.
+ * @param output The output value-key mappings of type {@code }.
+ * @return The updated output MultiValuedMap of type {@code }
+ * @see MultiValuedMap#inverted()
+ * @since 4.6.0
*/
- public static >
- M invert(MultiValuedMap extends V, ? extends K> input, M output) {
- for (Map.Entry extends V, ? extends K> e : input.entries()) {
+ public static > M invert(final MultiValuedMap extends V, ? extends K> input, final M output) {
+ for (final Map.Entry extends V, ? extends K> e : input.entries()) {
output.put(e.getValue(), e.getKey());
}
return output;
From 9b122c48770ef1c3403864a88006d864e66f6520 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 27 Dec 2025 07:28:51 -0500
Subject: [PATCH 14/53] Better exception message
---
.../java/org/apache/commons/collections4/MultiValuedMap.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/collections4/MultiValuedMap.java b/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
index 350e74e7e1..4264e6836a 100644
--- a/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
@@ -148,7 +148,7 @@ public interface MultiValuedMap {
* @return a new MultiValuedMap with inverted mappings
*/
default MultiValuedMap inverted() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(getClass() + ".inverted()");
}
/**
From 7f5cde16eddb67df2927abfb1ab3105cfba37b74 Mon Sep 17 00:00:00 2001
From: Sebb
Date: Sat, 27 Dec 2025 12:52:06 +0000
Subject: [PATCH 15/53] Add missing @since for inverted()
---
.../java/org/apache/commons/collections4/MultiValuedMap.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/org/apache/commons/collections4/MultiValuedMap.java b/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
index 4264e6836a..31ae1f005d 100644
--- a/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
@@ -146,6 +146,7 @@ public interface MultiValuedMap {
* for each key-to-value mapping in the original.
*
* @return a new MultiValuedMap with inverted mappings
+ * @since 4.6.0
*/
default MultiValuedMap inverted() {
throw new UnsupportedOperationException(getClass() + ".inverted()");
From c292567c96daa9a48ae0eb7a33fbd907497457d5 Mon Sep 17 00:00:00 2001
From: Sebb
Date: Sun, 28 Dec 2025 14:05:09 +0000
Subject: [PATCH 16/53] Suppress PMD false positive
---
.../java/org/apache/commons/collections4/IterableUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java
index d36a1317a3..5a06d3fb08 100644
--- a/src/main/java/org/apache/commons/collections4/IterableUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java
@@ -624,7 +624,7 @@ public Iterator iterator() {
return new LazyIteratorChain() {
@Override
protected Iterator extends E> nextIterator(final int count) {
- if (IterableUtils.isEmpty(iterable)) {
+ if (IterableUtils.isEmpty(iterable)) { //NOPMD: qualifier is needed here
return null;
}
return iterable.iterator();
From f0cb3c97857f4b5bfe364d49f07e29d6931f2ad8 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Mon, 29 Dec 2025 08:51:25 -0500
Subject: [PATCH 17/53] Bump notice file end year from 2025 to 2026
---
NOTICE.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NOTICE.txt b/NOTICE.txt
index 518b76e2c9..8c3e93e4e8 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
Apache Commons Collections
-Copyright 2001-2025 The Apache Software Foundation
+Copyright 2001-2026 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
From 561aab8132fc8b12077f22850402c272d8821268 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 30 Dec 2025 13:32:43 +0000
Subject: [PATCH 18/53] Javadoc typos
---
.../commons/collections4/iterators/UniqueFilterIterator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UniqueFilterIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UniqueFilterIterator.java
index 88eadd41ca..7370b1bd57 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UniqueFilterIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UniqueFilterIterator.java
@@ -31,9 +31,9 @@
public class UniqueFilterIterator extends FilterIterator {
/**
- * Constructs a new {@code UniqueFilterIterator}.
+ * Constructs a new {@code UniqueFilterIterator}.
*
- * @param iterator the iterator to use
+ * @param iterator the iterator to use
*/
public UniqueFilterIterator(final Iterator extends E> iterator) {
super(iterator, UniquePredicate.uniquePredicate());
From 84000199ea2a1c2e90761e4a96e3fdc9fcfe9694 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 30 Dec 2025 13:35:57 +0000
Subject: [PATCH 19/53] Javadoc
---
.../comparators/NullComparator.java | 146 +++++++++---------
1 file changed, 71 insertions(+), 75 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java b/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
index 882fc9fc50..b38c6203b1 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
@@ -35,99 +35,96 @@ public class NullComparator implements Comparator, Serializable {
private static final long serialVersionUID = -5820772575483504339L;
/**
- * The comparator to use when comparing two non-{@code null} objects.
- **/
+ * The comparator to use when comparing two non-{@code null} objects.
+ */
private final Comparator super E> nonNullComparator;
/**
- * Specifies whether a {@code null} are compared as higher than
- * non-{@code null} objects.
- **/
+ * Specifies whether a {@code null} are compared as higher than
+ * non-{@code null} objects.
+ */
private final boolean nullsAreHigh;
/**
- * Construct an instance that sorts {@code null} higher than any
- * non-{@code null} object it is compared with. When comparing two
- * non-{@code null} objects, the {@link ComparableComparator} is
- * used.
- **/
+ * Construct an instance that sorts {@code null} higher than any
+ * non-{@code null} object it is compared with. When comparing two
+ * non-{@code null} objects, the {@link ComparableComparator} is
+ * used.
+ */
public NullComparator() {
this(ComparatorUtils.NATURAL_COMPARATOR, true);
}
/**
- * Construct an instance that sorts {@code null} higher or lower than
- * any non-{@code null} object it is compared with. When comparing
- * two non-{@code null} objects, the {@link ComparableComparator} is
- * used.
+ * Construct an instance that sorts {@code null} higher or lower than
+ * any non-{@code null} object it is compared with. When comparing
+ * two non-{@code null} objects, the {@link ComparableComparator} is
+ * used.
*
- * @param nullsAreHigh a {@code true} value indicates that
- * {@code null} should be compared as higher than a
- * non-{@code null} object. A {@code false} value indicates
- * that {@code null} should be compared as lower than a
- * non-{@code null} object.
- **/
+ * @param nullsAreHigh a {@code true} value indicates that
+ * {@code null} should be compared as higher than a
+ * non-{@code null} object. A {@code false} value indicates
+ * that {@code null} should be compared as lower than a
+ * non-{@code null} object.
+ */
public NullComparator(final boolean nullsAreHigh) {
this(ComparatorUtils.NATURAL_COMPARATOR, nullsAreHigh);
}
/**
- * Construct an instance that sorts {@code null} higher than any
- * non-{@code null} object it is compared with. When comparing two
- * non-{@code null} objects, the specified {@link Comparator} is
- * used.
+ * Construct an instance that sorts {@code null} higher than any
+ * non-{@code null} object it is compared with. When comparing two
+ * non-{@code null} objects, the specified {@link Comparator} is
+ * used.
*
- * @param nonNullComparator the comparator to use when comparing two
- * non-{@code null} objects. This argument cannot be
- * {@code null}
- *
- * @throws NullPointerException if {@code nonNullComparator} is
- * {@code null}
- **/
+ * @param nonNullComparator the comparator to use when comparing two
+ * non-{@code null} objects. This argument cannot be
+ * {@code null}
+ * @throws NullPointerException if {@code nonNullComparator} is
+ * {@code null}
+ */
public NullComparator(final Comparator super E> nonNullComparator) {
this(nonNullComparator, true);
}
/**
- * Construct an instance that sorts {@code null} higher or lower than
- * any non-{@code null} object it is compared with. When comparing
- * two non-{@code null} objects, the specified {@link Comparator} is
- * used.
- *
- * @param nonNullComparator the comparator to use when comparing two
- * non-{@code null} objects. This argument cannot be
- * {@code null}
+ * Construct an instance that sorts {@code null} higher or lower than
+ * any non-{@code null} object it is compared with. When comparing
+ * two non-{@code null} objects, the specified {@link Comparator} is
+ * used.
*
- * @param nullsAreHigh a {@code true} value indicates that
- * {@code null} should be compared as higher than a
- * non-{@code null} object. A {@code false} value indicates
- * that {@code null} should be compared as lower than a
- * non-{@code null} object.
- *
- * @throws NullPointerException if {@code nonNullComparator} is
- * {@code null}
- **/
+ * @param nonNullComparator the comparator to use when comparing two
+ * non-{@code null} objects. This argument cannot be
+ * {@code null}
+ * @param nullsAreHigh a {@code true} value indicates that
+ * {@code null} should be compared as higher than a
+ * non-{@code null} object. A {@code false} value indicates
+ * that {@code null} should be compared as lower than a
+ * non-{@code null} object.
+ * @throws NullPointerException if {@code nonNullComparator} is
+ * {@code null}
+ */
public NullComparator(final Comparator super E> nonNullComparator, final boolean nullsAreHigh) {
this.nonNullComparator = Objects.requireNonNull(nonNullComparator, "nonNullComparator");
this.nullsAreHigh = nullsAreHigh;
}
/**
- * Perform a comparison between two objects. If both objects are
- * {@code null}, a {@code 0} value is returned. If one object
- * is {@code null} and the other is not, the result is determined on
- * whether the Comparator was constructed to have nulls as higher or lower
- * than other objects. If neither object is {@code null}, an
- * underlying comparator specified in the constructor (or the default) is
- * used to compare the non-{@code null} objects.
+ * Perform a comparison between two objects. If both objects are
+ * {@code null}, a {@code 0} value is returned. If one object
+ * is {@code null} and the other is not, the result is determined on
+ * whether the Comparator was constructed to have nulls as higher or lower
+ * than other objects. If neither object is {@code null}, an
+ * underlying comparator specified in the constructor (or the default) is
+ * used to compare the non-{@code null} objects.
*
- * @param o1 the first object to compare
- * @param o2 the object to compare it to.
- * @return {@code -1} if {@code o1} is "lower" than (less than,
- * before, etc.) {@code o2}; {@code 1} if {@code o1} is
- * "higher" than (greater than, after, etc.) {@code o2}; or
- * {@code 0} if {@code o1} and {@code o2} are equal.
- **/
+ * @param o1 the first object to compare
+ * @param o2 the object to compare it to.
+ * @return {@code -1} if {@code o1} is "lower" than (less than,
+ * before, etc.) {@code o2}; {@code 1} if {@code o1} is
+ * "higher" than (greater than, after, etc.) {@code o2}; or
+ * {@code 0} if {@code o1} and {@code o2} are equal.
+ */
@Override
public int compare(final E o1, final E o2) {
if (o1 == o2) {
@@ -143,16 +140,15 @@ public int compare(final E o1, final E o2) {
}
/**
- * Determines whether the specified object represents a comparator that is
- * equal to this comparator.
- *
- * @param obj the object to compare this comparator with.
+ * Determines whether the specified object represents a comparator that is
+ * equal to this comparator.
*
- * @return {@code true} if the specified object is a NullComparator
- * with equivalent {@code null} comparison behavior
- * (i.e. {@code null} high or low) and with equivalent underlying
- * non-{@code null} object comparators.
- **/
+ * @param obj the object to compare this comparator with.
+ * @return {@code true} if the specified object is a NullComparator
+ * with equivalent {@code null} comparison behavior
+ * (i.e. {@code null} high or low) and with equivalent underlying
+ * non-{@code null} object comparators.
+ */
@Override
public boolean equals(final Object obj) {
if (obj == null) {
@@ -172,11 +168,11 @@ public boolean equals(final Object obj) {
}
/**
- * Implement a hash code for this comparator that is consistent with
- * {@link #equals(Object)}.
+ * Implement a hash code for this comparator that is consistent with
+ * {@link #equals(Object)}.
*
- * @return a hash code for this comparator.
- **/
+ * @return a hash code for this comparator.
+ */
@Override
public int hashCode() {
return (nullsAreHigh ? -1 : 1) * nonNullComparator.hashCode();
From 8831944e5c176688a89d6cfbded8dbe1951cc8a7 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 30 Dec 2025 13:39:38 +0000
Subject: [PATCH 20/53] Javadoc
---
.../collection/AbstractCollectionTest.java | 208 +++++++++---------
.../collections4/list/AbstractListTest.java | 106 ++++-----
2 files changed, 158 insertions(+), 156 deletions(-)
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 bec79c3e09..425b83b007 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -261,45 +261,45 @@ private static void assertUnorderedArrayEquals(final Object[] a1, final Object[]
}
/**
- * A collection instance that will be used for testing.
+ * A collection instance that will be used for testing.
*/
private Collection collection;
/**
- * Confirmed collection. This is an instance of a collection that is
- * confirmed to conform exactly to the java.util.Collection contract.
- * Modification operations are tested by performing a mod on your
- * collection, performing the exact same mod on an equivalent confirmed
- * collection, and then calling verify() to make sure your collection
- * still matches the confirmed collection.
+ * Confirmed collection. This is an instance of a collection that is
+ * confirmed to conform exactly to the java.util.Collection contract.
+ * Modification operations are tested by performing a mod on your
+ * collection, performing the exact same mod on an equivalent confirmed
+ * collection, and then calling verify() to make sure your collection
+ * still matches the confirmed collection.
*/
private Collection confirmed;
/**
- * Specifies whether equal elements in the collection are, in fact,
- * distinguishable with information not readily available.
- *
- * If a particular value is to be removed from the collection, then there is
- * one and only one value that can be removed, even if there are other
- * elements which are equal to it.
- *
- *
- * In most collection cases, elements are not distinguishable (equal is
- * equal), thus this method defaults to return false. In some cases,
- * however, they are. For example, the collection returned from the map's
- * values() collection view are backed by the map, so while there may be
- * two values that are equal, their associated keys are not. Since the
- * keys are distinguishable, the values are.
- *
- *
- * This flag is used to skip some verifications for iterator.remove()
- * where it is impossible to perform an equivalent modification on the
- * confirmed collection because it is not possible to determine which
- * value in the confirmed collection to actually remove. Tests that
- * override the default (i.e. where equal elements are distinguishable),
- * should provide additional tests on iterator.remove() to make sure the
- * proper elements are removed when remove() is called on the iterator.
- *
+ * Specifies whether equal elements in the collection are, in fact,
+ * distinguishable with information not readily available.
+ *
+ * If a particular value is to be removed from the collection, then there is
+ * one and only one value that can be removed, even if there are other
+ * elements which are equal to it.
+ *
+ *
+ * In most collection cases, elements are not distinguishable (equal is
+ * equal), thus this method defaults to return false. In some cases,
+ * however, they are. For example, the collection returned from the map's
+ * values() collection view are backed by the map, so while there may be
+ * two values that are equal, their associated keys are not. Since the
+ * keys are distinguishable, the values are.
+ *
+ *
+ * This flag is used to skip some verifications for iterator.remove()
+ * where it is impossible to perform an equivalent modification on the
+ * confirmed collection because it is not possible to determine which
+ * value in the confirmed collection to actually remove. Tests that
+ * override the default (i.e. where equal elements are distinguishable),
+ * should provide additional tests on iterator.remove() to make sure the
+ * proper elements are removed when remove() is called on the iterator.
+ *
*/
public boolean areEqualElementsDistinguishable() {
return false;
@@ -323,18 +323,18 @@ public Collection getConfirmed() {
}
/**
- * Returns an array of objects that are contained in a collection
- * produced by {@link #makeFullCollection()}.
- *
- * Every element in the returned array must be an element in a full collection.
- *
- *
- * The default implementation returns a heterogeneous array of
- * objects with some duplicates. null is added if allowed.
- * Override if you require specific testing elements. Note that if you
- * override {@link #makeFullCollection()}, you must override
- * this method to reflect the contents of a full collection.
- *
+ * Returns an array of objects that are contained in a collection
+ * produced by {@link #makeFullCollection()}.
+ *
+ * Every element in the returned array must be an element in a full collection.
+ *
+ *
+ * The default implementation returns a heterogeneous array of
+ * objects with some duplicates. null is added if allowed.
+ * Override if you require specific testing elements. Note that if you
+ * override {@link #makeFullCollection()}, you must override
+ * this method to reflect the contents of a full collection.
+ *
*/
@SuppressWarnings("unchecked")
public E[] getFullElements() {
@@ -347,12 +347,12 @@ public E[] getFullElements() {
}
/**
- * Returns a list of elements suitable for return by
- * {@link #getFullElements()}. The array returned by this method
- * does not include null, but does include a variety of objects
- * of different types. Override getFullElements to return
- * the results of this method if your collection does not support
- * the null element.
+ * Returns a list of elements suitable for return by
+ * {@link #getFullElements()}. The array returned by this method
+ * does not include null, but does include a variety of objects
+ * of different types. Override getFullElements to return
+ * the results of this method if your collection does not support
+ * the null element.
*/
@SuppressWarnings("unchecked")
public E[] getFullNonNullElements() {
@@ -379,10 +379,10 @@ public E[] getFullNonNullElements() {
}
/**
- * Returns a list of string elements suitable for return by
- * {@link #getFullElements()}. Override getFullElements to return
- * the results of this method if your collection does not support
- * heterogeneous elements or the null element.
+ * Returns a list of string elements suitable for return by
+ * {@link #getFullElements()}. Override getFullElements to return
+ * the results of this method if your collection does not support
+ * heterogeneous elements or the null element.
*/
public Object[] getFullNonNullStringElements() {
return new Object[] {
@@ -404,22 +404,22 @@ protected int getIterationBehaviour() {
}
/**
- * Returns an array of elements that are not contained in a
- * full collection. Every element in the returned array must
- * not exist in a collection returned by {@link #makeFullCollection()}.
- * The default implementation returns a heterogeneous array of elements
- * without null. Note that some of the tests add these elements
- * to an empty or full collection, so if your collection restricts
- * certain kinds of elements, you should override this method.
+ * Returns an array of elements that are not contained in a
+ * full collection. Every element in the returned array must
+ * not exist in a collection returned by {@link #makeFullCollection()}.
+ * The default implementation returns a heterogeneous array of elements
+ * without null. Note that some of the tests add these elements
+ * to an empty or full collection, so if your collection restricts
+ * certain kinds of elements, you should override this method.
*/
public E[] getOtherElements() {
return getOtherNonNullElements();
}
/**
- * Returns the default list of objects returned by
- * {@link #getOtherElements()}. Includes many objects
- * of different types.
+ * Returns the default list of objects returned by
+ * {@link #getOtherElements()}. Includes many objects
+ * of different types.
*/
@SuppressWarnings("unchecked")
public E[] getOtherNonNullElements() {
@@ -437,10 +437,10 @@ public E[] getOtherNonNullElements() {
}
/**
- * Returns a list of string elements suitable for return by
- * {@link #getOtherElements()}. Override getOtherElements to return
- * the results of this method if your collection does not support
- * heterogeneous elements or the null element.
+ * Returns a list of string elements suitable for return by
+ * {@link #getOtherElements()}. Override getOtherElements to return
+ * the results of this method if your collection does not support
+ * heterogeneous elements or the null element.
*/
public Object[] getOtherNonNullStringElements() {
return new Object[] {
@@ -450,14 +450,14 @@ public Object[] getOtherNonNullStringElements() {
}
/**
- * Returns true if the collections produced by
- * {@link #makeObject()} and {@link #makeFullCollection()}
- * support the {@code add} and {@code addAll}
- * operations.
- *
- * Default implementation returns true. Override if your collection
- * class does not support add or addAll.
- *
+ * Returns true if the collections produced by
+ * {@link #makeObject()} and {@link #makeFullCollection()}
+ * support the {@code add} and {@code addAll}
+ * operations.
+ *
+ * Default implementation returns true. Override if your collection
+ * class does not support add or addAll.
+ *
*/
public boolean isAddSupported() {
return true;
@@ -489,44 +489,44 @@ public boolean isNullSupported() {
}
/**
- * Returns true if the collections produced by
- * {@link #makeObject()} and {@link #makeFullCollection()}
- * support the {@code remove}, {@code removeAll},
- * {@code retainAll}, {@code clear} and
- * {@code iterator().remove()} methods.
- * Default implementation returns true. Override if your collection
- * class does not support removal operations.
+ * Returns true if the collections produced by
+ * {@link #makeObject()} and {@link #makeFullCollection()}
+ * support the {@code remove}, {@code removeAll},
+ * {@code retainAll}, {@code clear} and
+ * {@code iterator().remove()} methods.
+ * Default implementation returns true. Override if your collection
+ * class does not support removal operations.
*/
public boolean isRemoveSupported() {
return true;
}
/**
- * Returns a confirmed empty collection.
- * For instance, an {@link java.util.ArrayList} for lists or a
- * {@link java.util.HashSet} for sets.
+ * Returns a confirmed empty collection.
+ * For instance, an {@link java.util.ArrayList} for lists or a
+ * {@link java.util.HashSet} for sets.
*
- * @return a confirmed empty collection
+ * @return a confirmed empty collection
*/
public abstract Collection makeConfirmedCollection();
/**
- * Returns a confirmed full collection.
- * For instance, an {@link java.util.ArrayList} for lists or a
- * {@link java.util.HashSet} for sets. The returned collection
- * should contain the elements returned by {@link #getFullElements()}.
+ * Returns a confirmed full collection.
+ * For instance, an {@link java.util.ArrayList} for lists or a
+ * {@link java.util.HashSet} for sets. The returned collection
+ * should contain the elements returned by {@link #getFullElements()}.
*
- * @return a confirmed full collection
+ * @return a confirmed full collection
*/
public abstract Collection makeConfirmedFullCollection();
/**
- * Returns a full collection to be used for testing. The collection
- * returned by this method should contain every element returned by
- * {@link #getFullElements()}. The default implementation, in fact,
- * simply invokes {@code addAll} on an empty collection with
- * the results of {@link #getFullElements()}. Override this default
- * if your collection doesn't support addAll.
+ * Returns a full collection to be used for testing. The collection
+ * returned by this method should contain every element returned by
+ * {@link #getFullElements()}. The default implementation, in fact,
+ * simply invokes {@code addAll} on an empty collection with
+ * the results of {@link #getFullElements()}. Override this default
+ * if your collection doesn't support addAll.
*/
public Collection makeFullCollection() {
final Collection c = makeObject();
@@ -541,9 +541,9 @@ public Collection makeFullCollection() {
public abstract Collection makeObject();
/**
- * Resets the {@link #collection} and {@link #confirmed} fields to empty
- * collections. Invoke this method before performing a modification
- * test.
+ * Resets the {@link #collection} and {@link #confirmed} fields to empty
+ * collections. Invoke this method before performing a modification
+ * test.
*/
public void resetEmpty() {
this.setCollection(makeObject());
@@ -551,9 +551,9 @@ public void resetEmpty() {
}
/**
- * Resets the {@link #collection} and {@link #confirmed} fields to full
- * collections. Invoke this method before performing a modification
- * test.
+ * Resets the {@link #collection} and {@link #confirmed} fields to full
+ * collections. Invoke this method before performing a modification
+ * test.
*/
public void resetFull() {
this.setCollection(makeFullCollection());
@@ -562,6 +562,7 @@ public void resetFull() {
/**
* Sets the collection.
+ *
* @param collection the Collection to set
*/
public void setCollection(final Collection collection) {
@@ -570,6 +571,7 @@ public void setCollection(final Collection collection) {
/**
* Sets the confirmed.
+ *
* @param confirmed the Collection to set
*/
public void setConfirmed(final Collection confirmed) {
diff --git a/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java b/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
index 839b82d42e..f1dad5c1b6 100644
--- a/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
+++ b/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
@@ -167,10 +167,10 @@ public boolean supportsSet() {
}
/**
- * Traverses to the beginning of the given iterator.
+ * Traverses to the beginning of the given iterator.
*
- * @param iter the iterator to traverse
- * @param i the starting index
+ * @param iter the iterator to traverse
+ * @param i the starting index
*/
private void backwardTest(final ListIterator iter, int i) {
final List list = getCollection();
@@ -203,14 +203,14 @@ public BulkTest bulkTestListIterator() {
}
/**
- * Returns a {@link BulkTest} for testing {@link List#subList(int,int)}.
- * The returned bulk test will run through every {@code TestList}
- * method, including another {@code bulkTestSubList}.
- * Sublists are tested until the size of the sublist is less than 10.
- * Each sublist is 6 elements smaller than its parent list.
- * (By default this means that two rounds of sublists will be tested).
- * The verify() method is overloaded to test that the original list is
- * modified when the sublist is.
+ * Returns a {@link BulkTest} for testing {@link List#subList(int,int)}.
+ * The returned bulk test will run through every {@code TestList}
+ * method, including another {@code bulkTestSubList}.
+ * Sublists are tested until the size of the sublist is less than 10.
+ * Each sublist is 6 elements smaller than its parent list.
+ * (By default this means that two rounds of sublists will be tested).
+ * The verify() method is overloaded to test that the original list is
+ * modified when the sublist is.
*/
public BulkTest bulkTestSubList() {
if (getFullElements().length - 6 < 10) {
@@ -271,10 +271,10 @@ protected void failFastMethod(final List list, final Method m) {
}
/**
- * Traverses to the end of the given iterator.
+ * Traverses to the end of the given iterator.
*
- * @param iter the iterator to traverse
- * @param i the starting index
+ * @param iter the iterator to traverse
+ * @param i the starting index
*/
private void forwardTest(final ListIterator iter, int i) {
final List list = getCollection();
@@ -328,11 +328,11 @@ public boolean isEqualsCheckable() {
}
/**
- * Returns true if the collections produced by
- * {@link #makeObject()} and {@link #makeFullCollection()}
- * support the set operation.
- * Default implementation returns true. Override if your collection
- * class does not support set.
+ * Returns true if the collections produced by
+ * {@link #makeObject()} and {@link #makeFullCollection()}
+ * support the set operation.
+ * Default implementation returns true. Override if your collection
+ * class does not support set.
*/
public boolean isSetSupported() {
return true;
@@ -458,7 +458,7 @@ void testFullListSerialization() throws IOException, ClassNotFoundException {
}
/**
- * Tests {@link List#add(int,Object)}.
+ * Tests {@link List#add(int,Object)}.
*/
@Test
void testListAddByIndex() {
@@ -478,8 +478,8 @@ void testListAddByIndex() {
}
/**
- * Tests bounds checking for {@link List#add(int, Object)} on an
- * empty list.
+ * Tests bounds checking for {@link List#add(int, Object)} on an
+ * empty list.
*/
@Test
void testListAddByIndexBoundsChecking() {
@@ -507,8 +507,8 @@ void testListAddByIndexBoundsChecking() {
}
/**
- * Tests bounds checking for {@link List#add(int, Object)} on a
- * full list.
+ * Tests bounds checking for {@link List#add(int, Object)} on a
+ * full list.
*/
@Test
void testListAddByIndexBoundsChecking2() {
@@ -536,7 +536,7 @@ void testListAddByIndexBoundsChecking2() {
}
/**
- * Tests {@link List#equals(Object)}.
+ * Tests {@link List#equals(Object)}.
*/
@Test
void testListEquals() {
@@ -607,7 +607,7 @@ public int size() {
}
/**
- * Tests {@link List#get(int)}.
+ * Tests {@link List#get(int)}.
*/
@Test
void testListGetByIndex() {
@@ -621,8 +621,8 @@ void testListGetByIndex() {
}
/**
- * Tests bounds checking for {@link List#get(int)} on an
- * empty list.
+ * Tests bounds checking for {@link List#get(int)} on an
+ * empty list.
*/
@Test
void testListGetByIndexBoundsChecking() {
@@ -645,8 +645,8 @@ void testListGetByIndexBoundsChecking() {
}
/**
- * Tests bounds checking for {@link List#get(int)} on a
- * full list.
+ * Tests bounds checking for {@link List#get(int)} on a
+ * full list.
*/
@Test
void testListGetByIndexBoundsChecking2() {
@@ -666,7 +666,7 @@ void testListGetByIndexBoundsChecking2() {
}
/**
- * Tests {@link List#hashCode()}.
+ * Tests {@link List#hashCode()}.
*/
@Test
void testListHashCode() {
@@ -684,7 +684,7 @@ void testListHashCode() {
}
/**
- * Tests {@link List#indexOf}.
+ * Tests {@link List#indexOf}.
*/
@Test
void testListIndexOf() {
@@ -707,8 +707,8 @@ void testListIndexOf() {
}
/**
- * Tests the {@link ListIterator#add(Object)} method of the list
- * iterator.
+ * Tests the {@link ListIterator#add(Object)} method of the list
+ * iterator.
*/
@Test
void testListIteratorAdd() {
@@ -743,8 +743,8 @@ void testListIteratorAdd() {
}
/**
- * Tests the {@link ListIterator#set(Object)} method of the list
- * iterator.
+ * Tests the {@link ListIterator#set(Object)} method of the list
+ * iterator.
*/
@Test
void testListIteratorSet() {
@@ -767,7 +767,7 @@ void testListIteratorSet() {
}
/**
- * Tests {@link List#lastIndexOf}.
+ * Tests {@link List#lastIndexOf}.
*/
@Test
void testListLastIndexOf() {
@@ -790,7 +790,7 @@ void testListLastIndexOf() {
}
/**
- * Tests the read-only bits of {@link List#listIterator()}.
+ * Tests the read-only bits of {@link List#listIterator()}.
*/
@Test
void testListListIterator() {
@@ -800,7 +800,7 @@ void testListListIterator() {
}
/**
- * Tests the read-only bits of {@link List#listIterator(int)}.
+ * Tests the read-only bits of {@link List#listIterator(int)}.
*/
@Test
void testListListIteratorByIndex() {
@@ -945,7 +945,7 @@ void testListListIteratorPreviousRemovePrevious() {
}
/**
- * Tests {@link List#remove(int)}.
+ * Tests {@link List#remove(int)}.
*/
@Test
void testListRemoveByIndex() {
@@ -964,8 +964,8 @@ void testListRemoveByIndex() {
}
/**
- * Tests bounds checking for {@link List#remove(int)} on an
- * empty list.
+ * Tests bounds checking for {@link List#remove(int)} on an
+ * empty list.
*/
@Test
void testListRemoveByIndexBoundsChecking() {
@@ -992,8 +992,8 @@ void testListRemoveByIndexBoundsChecking() {
}
/**
- * Tests bounds checking for {@link List#remove(int)} on a
- * full list.
+ * Tests bounds checking for {@link List#remove(int)} on a
+ * full list.
*/
@Test
void testListRemoveByIndexBoundsChecking2() {
@@ -1017,7 +1017,7 @@ void testListRemoveByIndexBoundsChecking2() {
}
/**
- * Test {@link List#set(int,Object)}.
+ * Test {@link List#set(int,Object)}.
*/
@Test
void testListSetByIndex() {
@@ -1039,8 +1039,8 @@ void testListSetByIndex() {
}
/**
- * Tests bounds checking for {@link List#set(int,Object)} on an
- * empty list.
+ * Tests bounds checking for {@link List#set(int,Object)} on an
+ * empty list.
*/
@Test
void testListSetByIndexBoundsChecking() {
@@ -1068,8 +1068,8 @@ void testListSetByIndexBoundsChecking() {
}
/**
- * Tests bounds checking for {@link List#set(int,Object)} on a
- * full list.
+ * Tests bounds checking for {@link List#set(int,Object)} on a
+ * full list.
*/
@Test
void testListSetByIndexBoundsChecking2() {
@@ -1169,8 +1169,8 @@ void testListSubListFailFastOnRemove() {
}
/**
- * If {@link #isSetSupported()} returns false, tests that set operation
- * raises UnsupportedOperationException.
+ * If {@link #isSetSupported()} returns false, tests that set operation
+ * raises UnsupportedOperationException.
*/
@Test
void testUnsupportedSet() {
@@ -1187,8 +1187,8 @@ void testUnsupportedSet() {
}
/**
- * Verifies that the test list implementation matches the confirmed list
- * implementation.
+ * Verifies that the test list implementation matches the confirmed list
+ * implementation.
*/
@Override
@SuppressWarnings("unchecked")
From 879d274971eceb8aace62f44ce6201516ac53038 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Wed, 31 Dec 2025 17:41:48 -0500
Subject: [PATCH 21/53] Javadoc: Empty Javadoc line before the 1st tag.
---
.../apache/commons/collections4/CollectionUtils.java | 6 ++++++
.../apache/commons/collections4/FluentIterable.java | 1 +
.../apache/commons/collections4/IteratorUtils.java | 1 +
.../org/apache/commons/collections4/ListUtils.java | 1 +
.../org/apache/commons/collections4/SetUtils.java | 2 ++
.../apache/commons/collections4/SortedBidiMap.java | 1 +
.../collections4/bag/AbstractBagDecorator.java | 1 +
.../commons/collections4/bag/AbstractMapBag.java | 2 ++
.../collections4/bag/AbstractSortedBagDecorator.java | 1 +
.../commons/collections4/bag/SynchronizedBag.java | 1 +
.../collections4/bidimap/AbstractDualBidiMap.java | 5 +++++
.../commons/collections4/bidimap/DualTreeBidiMap.java | 2 ++
.../commons/collections4/bidimap/TreeBidiMap.java | 2 ++
.../collections4/bloomfilter/BitMapExtractor.java | 1 +
.../commons/collections4/bloomfilter/BloomFilter.java | 1 +
.../collections4/bloomfilter/CountingBloomFilter.java | 2 ++
.../commons/collections4/bloomfilter/IndexFilter.java | 3 +++
.../collections4/bloomfilter/LayerManager.java | 1 +
.../collection/AbstractCollectionDecorator.java | 1 +
.../collections4/collection/CompositeCollection.java | 11 +++++++++++
.../collections4/iterators/BoundedIterator.java | 1 +
.../collections4/iterators/EmptyMapIterator.java | 2 ++
.../iterators/EmptyOrderedMapIterator.java | 2 ++
.../collections4/iterators/FilterListIterator.java | 2 ++
.../collections4/iterators/PermutationIterator.java | 3 +++
.../collections4/iterators/SingletonListIterator.java | 1 +
.../commons/collections4/keyvalue/MultiKey.java | 2 ++
.../collections4/list/AbstractListDecorator.java | 1 +
.../collections4/map/AbstractMapDecorator.java | 1 +
.../collections4/map/AbstractOrderedMapDecorator.java | 1 +
.../collections4/map/AbstractReferenceMap.java | 2 ++
.../collections4/map/AbstractSortedMapDecorator.java | 2 ++
.../map/EntrySetToMapIteratorAdapter.java | 2 ++
.../collections4/multimap/AbstractListValuedMap.java | 1 +
.../collections4/multimap/AbstractSetValuedMap.java | 1 +
.../collections4/multiset/AbstractMapMultiSet.java | 4 ++++
.../collections4/multiset/SynchronizedMultiSet.java | 1 +
.../collections4/set/AbstractSetDecorator.java | 1 +
.../collections4/set/AbstractSortedSetDecorator.java | 1 +
.../apache/commons/collections4/set/CompositeSet.java | 3 +++
.../splitmap/AbstractIterableGetMapDecorator.java | 2 ++
.../collections4/trie/AbstractBitwiseTrie.java | 1 +
.../collections4/trie/analyzer/StringKeyAnalyzer.java | 1 +
43 files changed, 84 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/CollectionUtils.java b/src/main/java/org/apache/commons/collections4/CollectionUtils.java
index 2ba14cc76e..9cc1b80e60 100644
--- a/src/main/java/org/apache/commons/collections4/CollectionUtils.java
+++ b/src/main/java/org/apache/commons/collections4/CollectionUtils.java
@@ -58,6 +58,7 @@ public class CollectionUtils {
/**
* Helper class to easily access cardinality properties of two collections.
+ *
* @param the element type
*/
private static class CardinalityHelper {
@@ -169,6 +170,7 @@ public int hashCode() {
/**
* Helper class for set-related operations, for example union, subtract, intersection.
+ *
* @param the element type
*/
private static final class SetOperationCardinalityHelper extends CardinalityHelper implements Iterable {
@@ -181,6 +183,7 @@ private static final class SetOperationCardinalityHelper extends CardinalityH
/**
* Create a new set operation helper from the two collections.
+ *
* @param a the first collection
* @param b the second collection
*/
@@ -200,6 +203,7 @@ public Iterator iterator() {
/**
* Returns the resulting collection.
+ *
* @return the result
*/
public Collection list() {
@@ -208,6 +212,7 @@ public Collection list() {
/**
* Add the object {@code count} times to the result collection.
+ *
* @param obj the object to add
* @param count the count
*/
@@ -373,6 +378,7 @@ public static int cardinality(final O obj, final Iterable super O> collect
/**
* Ensures an index is not negative.
+ *
* @param index the index to check.
* @throws IndexOutOfBoundsException if the index is negative.
*/
diff --git a/src/main/java/org/apache/commons/collections4/FluentIterable.java b/src/main/java/org/apache/commons/collections4/FluentIterable.java
index e58ad1e281..77523d3596 100644
--- a/src/main/java/org/apache/commons/collections4/FluentIterable.java
+++ b/src/main/java/org/apache/commons/collections4/FluentIterable.java
@@ -138,6 +138,7 @@ public static FluentIterable of(final T... elements) {
/**
* Create a new FluentIterable by wrapping the provided iterable.
+ *
* @param iterable the iterable to wrap
*/
private FluentIterable(final Iterable iterable) {
diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
index 41858a7af8..cf27afb197 100644
--- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
@@ -759,6 +759,7 @@ private static E find(final Iterator iterator, final Predicate super E>
* The Iterator is advanced to {@code 0} (or to the end, if
* {@code 0} exceeds the number of entries) as a side effect of this method.
*
+ *
* @param the type of object in the {@link Iterator}
* @param iterator the iterator to get a value from
* @return the first object
diff --git a/src/main/java/org/apache/commons/collections4/ListUtils.java b/src/main/java/org/apache/commons/collections4/ListUtils.java
index 1fb90acc69..7d658cb434 100644
--- a/src/main/java/org/apache/commons/collections4/ListUtils.java
+++ b/src/main/java/org/apache/commons/collections4/ListUtils.java
@@ -96,6 +96,7 @@ public void visitKeepCommand(final E object) {
/**
* Provides a partition view on a {@link List}.
+ *
* @since 4.0
*/
private static final class Partition extends AbstractList> {
diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java
index bc375cfe4a..a6029f9d15 100644
--- a/src/main/java/org/apache/commons/collections4/SetUtils.java
+++ b/src/main/java/org/apache/commons/collections4/SetUtils.java
@@ -81,6 +81,7 @@ public > void copyInto(final S set) {
/**
* Return an iterator for this view; the returned iterator is
* not required to be unmodifiable.
+ *
* @return a new iterator for this view
*/
protected abstract Iterator createIterator();
@@ -644,6 +645,7 @@ public static SortedSet unmodifiableNavigableSet(final NavigableSet se
/**
* Creates an unmodifiable set from the given items. If the passed var-args argument is {@code
* null}, then the method returns {@code null}.
+ *
* @param the element type
* @param items the elements that make up the new set
* @return a set
diff --git a/src/main/java/org/apache/commons/collections4/SortedBidiMap.java b/src/main/java/org/apache/commons/collections4/SortedBidiMap.java
index 5d175aaf08..72cd7e779c 100644
--- a/src/main/java/org/apache/commons/collections4/SortedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/SortedBidiMap.java
@@ -56,6 +56,7 @@ public interface SortedBidiMap extends OrderedBidiMap, SortedMap super V> valueComparator();
diff --git a/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java b/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java
index ea94dd2012..a932fcff2c 100644
--- a/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java
@@ -38,6 +38,7 @@ public abstract class AbstractBagDecorator
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractBagDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java b/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
index 4619afc92d..f64d19c933 100644
--- a/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
@@ -121,6 +121,7 @@ protected static class MutableInteger {
/**
* Constructs a new instance.
+ *
* @param value the initial value
*/
MutableInteger(final int value) {
@@ -479,6 +480,7 @@ public boolean removeAll(final Collection> coll) {
/**
* Remove any members of the bag that are not in the given bag, respecting
* cardinality.
+ *
* @see #retainAll(Collection)
* @param other the bag to retain
* @return {@code true} if this call changed the collection
diff --git a/src/main/java/org/apache/commons/collections4/bag/AbstractSortedBagDecorator.java b/src/main/java/org/apache/commons/collections4/bag/AbstractSortedBagDecorator.java
index d73a5569b0..723fc65f9e 100644
--- a/src/main/java/org/apache/commons/collections4/bag/AbstractSortedBagDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/bag/AbstractSortedBagDecorator.java
@@ -37,6 +37,7 @@ public abstract class AbstractSortedBagDecorator
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractSortedBagDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java b/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java
index 1313f1cc62..5990e1a830 100644
--- a/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java
@@ -46,6 +46,7 @@ final class SynchronizedBagSet extends SynchronizedCollection implements Set<
/**
* Constructs a new instance.
+ *
* @param set the set to decorate
* @param lock the lock to use, shared with the bag
*/
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
index 67c20c236c..f22501b846 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
@@ -67,6 +67,7 @@ protected static class BidiMapIterator implements MapIterator, Reset
/**
* Constructs a new instance.
+ *
* @param parent the parent map
*/
protected BidiMapIterator(final AbstractDualBidiMap parent) {
@@ -210,6 +211,7 @@ protected static class EntrySetIterator extends AbstractIteratorDecorator<
/**
* Constructs a new instance.
+ *
* @param iterator the iterator to decorate
* @param parent the parent map
*/
@@ -298,6 +300,7 @@ protected static class KeySetIterator extends AbstractIteratorDecorator {
/**
* Constructs a new instance.
+ *
* @param iterator the iterator to decorate
* @param parent the parent map
*/
@@ -339,6 +342,7 @@ protected static class MapEntry extends AbstractMapEntryDecorator {
/**
* Constructs a new instance.
+ *
* @param entry the entry to decorate
* @param parent the parent map
*/
@@ -419,6 +423,7 @@ protected static class ValuesIterator extends AbstractIteratorDecorator {
/**
* Constructs a new instance.
+ *
* @param iterator the iterator to decorate
* @param parent the parent map
*/
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java
index f539081ca4..e897be87b2 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java
@@ -78,6 +78,7 @@ protected static class BidiOrderedMapIterator implements OrderedMapIterato
/**
* Constructs a new instance.
+ *
* @param parent the parent map
*/
protected BidiOrderedMapIterator(final AbstractDualBidiMap parent) {
@@ -174,6 +175,7 @@ public String toString() {
protected static class ViewMap extends AbstractSortedMapDecorator {
/**
* Constructs a new instance.
+ *
* @param bidi the parent bidi map
* @param sm the subMap sorted map
*/
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
index c7ed23ff94..2524c11a96 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
@@ -95,6 +95,7 @@ abstract class AbstractView extends AbstractSet {
/**
* Constructs a new instance.
+ *
* @param orderType the KEY or VALUE int for the order
*/
AbstractView(final DataElement orderType) {
@@ -130,6 +131,7 @@ abstract class AbstractViewIterator {
/**
* Constructs a new instance.
+ *
* @param orderType the KEY or VALUE int for the order
*/
AbstractViewIterator(final DataElement orderType) {
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java
index 886a43057b..fcb101e757 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java
@@ -94,6 +94,7 @@ static BitMapExtractor fromIndexExtractor(final IndexExtractor extractor, final
* The default implementation of this method is slow. It is recommended
* that implementing classes reimplement this method.
*
+ *
* @return An array of bit map data.
*/
default long[] asBitMapArray() {
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
index 7f89b26e91..b006e5317c 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
@@ -232,6 +232,7 @@ default int estimateUnion(final BloomFilter> other) {
/**
* Gets the shape that was used when the filter was built.
+ *
* @return The shape the filter was built with.
*/
Shape getShape();
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
index cdad5286e6..0a1dbed676 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
@@ -234,6 +234,7 @@ default boolean merge(final Hasher hasher) {
* to a CellExtractor and add that.
* Implementations should throw {@code IllegalArgumentException} and no other exception on bad input.
*
+ *
* @param indexExtractor the IndexExtractor
* @return {@code true} if the removal was successful and the state is valid
* @see #isValid()
@@ -348,6 +349,7 @@ default boolean remove(final IndexExtractor indexExtractor) {
/**
* The default implementation is a no-op since the counting bloom filter returns an unique IndexExtractor by default.
+ *
* @return this counting Bloom filter.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/IndexFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/IndexFilter.java
index a494ee9aa2..646093f298 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/IndexFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/IndexFilter.java
@@ -32,6 +32,7 @@ public final class IndexFilter {
/**
* An IndexTracker implementation that uses an array of integers to track whether or not a
* number has been seen. Suitable for Shapes that have few hash functions.
+ *
* @since 4.5.0
*/
static class ArrayTracker implements IntPredicate {
@@ -40,6 +41,7 @@ static class ArrayTracker implements IntPredicate {
/**
* Constructs the tracker based on the shape.
+ *
* @param shape the shape to build the tracker for.
*/
ArrayTracker(final Shape shape) {
@@ -70,6 +72,7 @@ static class BitMapTracker implements IntPredicate {
/**
* Constructs a bit map based tracker for the specified shape.
+ *
* @param shape The shape that is being generated.
*/
BitMapTracker(final Shape shape) {
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java b/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java
index 607bf0517a..7aa9b1c590 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java
@@ -361,6 +361,7 @@ public LayerManager copy() {
/**
* Gets the Bloom filter from the first layer.
* No extension check is performed during this call.
+ *
* @return The Bloom filter from the first layer.
* @see #getTarget()
*/
diff --git a/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java b/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
index 34ce3d3d70..e764eb5566 100644
--- a/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
@@ -67,6 +67,7 @@ public abstract class AbstractCollectionDecorator
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractCollectionDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java b/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
index 1b21ab3332..d89db8d669 100644
--- a/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
@@ -37,6 +37,7 @@
* Add and remove operations require the use of a pluggable strategy. If no
* strategy is provided then add and remove are unsupported.
*
+ *
* @param the type of the elements in the collection
* @since 3.0
*/
@@ -228,6 +229,7 @@ public void addComposited(final Collection compositeCollection1,
*
* This implementation calls {@code clear()} on each collection.
*
+ *
* @throws UnsupportedOperationException if clear is unsupported
*/
@Override
@@ -242,6 +244,7 @@ public void clear() {
*
* This implementation calls {@code contains()} on each collection.
*
+ *
* @param obj the object to search for
* @return true if obj is contained in any of the contained collections
*/
@@ -261,6 +264,7 @@ public boolean contains(final Object obj) {
* This implementation calls {@code contains()} for each element in the
* specified collection.
*
+ *
* @param coll the collection to check for
* @return true if all elements contained
*/
@@ -288,6 +292,7 @@ public List> getCollections() {
/**
* Gets the collection mutator to be used for this CompositeCollection.
+ *
* @return CollectionMutator<E>
*/
protected CollectionMutator getMutator() {
@@ -299,6 +304,7 @@ protected CollectionMutator getMutator() {
*
* This implementation calls {@code isEmpty()} on each collection.
*
+ *
* @return true if all of the contained collections are empty
*/
@Override
@@ -316,6 +322,7 @@ public boolean isEmpty() {
*
* This implementation uses an {@code IteratorChain}.
*
+ *
* @return an {@code IteratorChain} instance which supports
* {@code remove()}. Iteration occurs over contained collections in
* the order they were added, but this behavior should not be relied upon.
@@ -356,6 +363,7 @@ public boolean remove(final Object obj) {
*
* This implementation calls {@code removeAll} on each collection.
*
+ *
* @param coll the collection to remove
* @return true if the collection was modified
* @throws UnsupportedOperationException if removeAll is unsupported
@@ -386,6 +394,7 @@ public void removeComposited(final Collection coll) {
*
* This implementation calls {@code removeIf} on each collection.
*
+ *
* @param filter a predicate which returns true for elements to be removed
* @return true if the collection was modified
* @throws UnsupportedOperationException if removeIf is unsupported
@@ -409,6 +418,7 @@ public boolean removeIf(final Predicate super E> filter) {
*
* This implementation calls {@code retainAll()} on each collection.
*
+ *
* @param coll the collection to remove
* @return true if the collection was modified
* @throws UnsupportedOperationException if retainAll is unsupported
@@ -438,6 +448,7 @@ public void setMutator(final CollectionMutator mutator) {
*
* This implementation calls {@code size()} on each collection.
*
+ *
* @return total number of elements in all contained containers
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java b/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java
index 73d3b2f316..300910b442 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java
@@ -82,6 +82,7 @@ public BoundedIterator(final Iterator extends E> iterator, final long offset,
/**
* Checks whether the iterator is still within its bounded range.
+ *
* @return {@code true} if the iterator is within its bounds, {@code false} otherwise
*/
private boolean checkBounds() {
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
index 52265fec20..1aac23f18b 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
@@ -30,6 +30,7 @@ public class EmptyMapIterator extends AbstractEmptyMapIterator imple
/**
* Singleton instance of the iterator.
+ *
* @since 3.1
*/
@SuppressWarnings("rawtypes")
@@ -37,6 +38,7 @@ public class EmptyMapIterator extends AbstractEmptyMapIterator imple
/**
* Gets a typed instance of the iterator.
+ *
* @param the key type
* @param the value type
* @return {@link MapIterator}<K, V>
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
index 0ee07de620..b3e0fb4de7 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
@@ -30,6 +30,7 @@ public class EmptyOrderedMapIterator extends AbstractEmptyMapIterator extends AbstractEmptyMapIterator the key type
* @param the value type
* @return {@link OrderedMapIterator}<K, V>
diff --git a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
index 7a2e88b72b..67fb422c49 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
@@ -109,6 +109,7 @@ public FilterListIterator(final Predicate super E> predicate) {
/**
* Not supported.
+ *
* @param o the element to insert
*/
@Override
@@ -194,6 +195,7 @@ public void remove() {
/**
* Not supported.
+ *
* @param ignored the element with which to replace the last element returned by
* {@code next} or {@code previous}
*/
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
index 542cdae0d0..6aace66579 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
@@ -71,6 +71,7 @@ public class PermutationIterator implements Iterator> {
/**
* Standard constructor for this class.
+ *
* @param collection the collection to generate permutations for
* @throws NullPointerException if coll is null
*/
@@ -91,6 +92,7 @@ public PermutationIterator(final Collection extends E> collection) {
/**
* Indicates if there are more permutation available.
+ *
* @return true if there are more permutations, otherwise false
*/
@Override
@@ -100,6 +102,7 @@ public boolean hasNext() {
/**
* Returns the next permutation of the input collection.
+ *
* @return a list of the permutator's elements representing a permutation
* @throws NoSuchElementException if there are no more permutations
*/
diff --git a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
index 6496e41a79..53529a98b2 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
@@ -140,6 +140,7 @@ public int previousIndex() {
/**
* Remove the object from this iterator.
+ *
* @throws IllegalStateException if the {@code next} or {@code previous}
* method has not yet been called, or the {@code remove} method
* has already been called after the last call to {@code next}
diff --git a/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java b/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java
index 4515372d23..dcc621eb3b 100644
--- a/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java
+++ b/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java
@@ -233,6 +233,7 @@ public MultiKey(final K[] keys, final boolean makeClone) {
/**
* Calculate the hash code of the instance using the provided keys.
+ *
* @param keys the keys to calculate the hash code for
*/
private void calculateHashCode(final Object[] keys) {
@@ -316,6 +317,7 @@ public int hashCode() {
* Recalculate the hash code after deserialization. The hash code of some
* keys might have change (hash codes based on the system hash code are
* only stable for the same process).
+ *
* @return the instance with recalculated hash code
*/
protected Object readResolve() {
diff --git a/src/main/java/org/apache/commons/collections4/list/AbstractListDecorator.java b/src/main/java/org/apache/commons/collections4/list/AbstractListDecorator.java
index 25ecf62669..ee85167de5 100644
--- a/src/main/java/org/apache/commons/collections4/list/AbstractListDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/list/AbstractListDecorator.java
@@ -38,6 +38,7 @@ public abstract class AbstractListDecorator extends AbstractCollectionDecorat
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractListDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java
index 5047b1ac76..ffcae5ee29 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java
@@ -47,6 +47,7 @@ public abstract class AbstractMapDecorator extends AbstractIterableMap extends AbstractMapDecor
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractOrderedMapDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
index 3b08521555..bf10403514 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
@@ -309,6 +309,7 @@ protected void onPurge() {
/**
* Purges the specified reference
+ *
* @param ref the reference to purge
* @return true or false
*/
@@ -517,6 +518,7 @@ public enum ReferenceStrength {
/**
* Resolve enum from int.
+ *
* @param value the int value
* @return ReferenceType
* @throws IllegalArgumentException if the specified value is invalid.
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
index 78a49ef6a1..75a6d7dca3 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
@@ -59,6 +59,7 @@ protected static class SortedMapIterator extends EntrySetToMapIteratorAdap
/**
* Create a new AbstractSortedMapDecorator.SortedMapIterator.
+ *
* @param entrySet the entrySet to iterate
*/
protected SortedMapIterator(final Set> entrySet) {
@@ -94,6 +95,7 @@ public synchronized void reset() {
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractSortedMapDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java b/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java
index 3f9d57ee3d..636e14d9e6 100644
--- a/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java
+++ b/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java
@@ -43,6 +43,7 @@ public class EntrySetToMapIteratorAdapter implements MapIterator, Re
/**
* Create a new EntrySetToMapIteratorAdapter.
+ *
* @param entrySet the entrySet to adapt
*/
public EntrySetToMapIteratorAdapter(final Set> entrySet) {
@@ -52,6 +53,7 @@ public EntrySetToMapIteratorAdapter(final Set> entrySet) {
/**
* Gets the currently active entry.
+ *
* @return Map.Entry<K, V>
*/
protected synchronized Map.Entry current() {
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java
index f14371f9bc..de34ee31bb 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java
@@ -242,6 +242,7 @@ protected AbstractListValuedMap(final Map> map) {
/**
* Creates a new value collection using the provided factory.
+ *
* @return a new list
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java
index 5f3b940cf4..ff98ea2b75 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java
@@ -87,6 +87,7 @@ protected AbstractSetValuedMap(final Map> map) {
/**
* Creates a new value collection using the provided factory.
+ *
* @return a new set
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
index 19e7f620c3..317e7d2c5e 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
@@ -64,6 +64,7 @@ protected static class EntrySetIterator implements Iterator> {
/**
* Constructs a new instance.
+ *
* @param decorated the iterator to decorate
* @param parent the parent multiset
*/
@@ -174,6 +175,7 @@ protected static class MultiSetEntry extends AbstractEntry {
/**
* Constructs a new instance.
+ *
* @param parentEntry the entry to decorate
*/
protected MultiSetEntry(final Map.Entry parentEntry) {
@@ -200,6 +202,7 @@ protected static class MutableInteger {
/**
* Constructs a new instance.
+ *
* @param value the initial value
*/
MutableInteger(final int value) {
@@ -238,6 +241,7 @@ protected static class UniqueSetIterator extends AbstractIteratorDecorator
/**
* Constructs a new instance.
+ *
* @param iterator the iterator to decorate
* @param parent the parent multiset
*/
diff --git a/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java
index 426ad6438e..9fdc2188fa 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/SynchronizedMultiSet.java
@@ -45,6 +45,7 @@ static class SynchronizedSet extends SynchronizedCollection implements Set
/**
* Constructs a new instance.
+ *
* @param set the set to decorate
* @param lock the lock to use, shared with the multiset
*/
diff --git a/src/main/java/org/apache/commons/collections4/set/AbstractSetDecorator.java b/src/main/java/org/apache/commons/collections4/set/AbstractSetDecorator.java
index 7df2cd040d..9b0d010d86 100644
--- a/src/main/java/org/apache/commons/collections4/set/AbstractSetDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/set/AbstractSetDecorator.java
@@ -37,6 +37,7 @@ public abstract class AbstractSetDecorator extends AbstractCollectionDecorato
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractSetDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/set/AbstractSortedSetDecorator.java b/src/main/java/org/apache/commons/collections4/set/AbstractSortedSetDecorator.java
index 4ac4831f1f..14d8d82778 100644
--- a/src/main/java/org/apache/commons/collections4/set/AbstractSortedSetDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/set/AbstractSortedSetDecorator.java
@@ -38,6 +38,7 @@ public abstract class AbstractSortedSetDecorator
/**
* Constructor only used in deserialization, do not use otherwise.
+ *
* @since 3.1
*/
protected AbstractSortedSetDecorator() {
diff --git a/src/main/java/org/apache/commons/collections4/set/CompositeSet.java b/src/main/java/org/apache/commons/collections4/set/CompositeSet.java
index 6560153fc8..7c51e5eee0 100644
--- a/src/main/java/org/apache/commons/collections4/set/CompositeSet.java
+++ b/src/main/java/org/apache/commons/collections4/set/CompositeSet.java
@@ -289,6 +289,7 @@ public boolean containsAll(final Collection> coll) {
/**
* {@inheritDoc}
+ *
* @see java.util.Set#equals
*/
@Override
@@ -302,6 +303,7 @@ public boolean equals(final Object obj) {
/**
* Gets the set mutator to be used for this CompositeSet.
+ *
* @return the set mutator
*/
protected SetMutator getMutator() {
@@ -319,6 +321,7 @@ public List> getSets() {
/**
* {@inheritDoc}
+ *
* @see java.util.Set#hashCode
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/splitmap/AbstractIterableGetMapDecorator.java b/src/main/java/org/apache/commons/collections4/splitmap/AbstractIterableGetMapDecorator.java
index 6b394e1fce..60bfe5df54 100644
--- a/src/main/java/org/apache/commons/collections4/splitmap/AbstractIterableGetMapDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/splitmap/AbstractIterableGetMapDecorator.java
@@ -46,6 +46,7 @@ protected AbstractIterableGetMapDecorator() {
/**
* Create a new AbstractSplitMapDecorator.
+ *
* @param map the map to decorate, must not be null
* @throws NullPointerException if map is null
*/
@@ -107,6 +108,7 @@ public Set keySet() {
/**
* Gets a MapIterator over this Get.
+ *
* @return MapIterator<K, V>
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java b/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java
index b934f7c83f..5e7d69a2d2 100644
--- a/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java
+++ b/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java
@@ -184,6 +184,7 @@ final boolean compareKeys(final K key, final K other) {
/**
* Gets the {@link KeyAnalyzer} that constructed the {@link Trie}.
+ *
* @return the {@link KeyAnalyzer} used by this {@link Trie}
*/
protected KeyAnalyzer super K> getKeyAnalyzer() {
diff --git a/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java b/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
index d3d76a2589..6b0aaa6dfb 100644
--- a/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
+++ b/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
@@ -23,6 +23,7 @@
*
* This class is stateless.
*
+ *
* @since 4.0
*/
public class StringKeyAnalyzer extends KeyAnalyzer {
From 7209aabe965d128b3c3372d094a75b7558ea5cc8 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Thu, 1 Jan 2026 07:53:13 -0500
Subject: [PATCH 22/53] Fix XML Schema xsi:schemaLocation name (as opposed to
URI)
---
src/site/xdoc/building.xml | 2 +-
src/site/xdoc/compatibility.xml | 2 +-
src/site/xdoc/download_collections.xml | 2 +-
src/site/xdoc/history.xml | 2 +-
src/site/xdoc/index.xml | 2 +-
src/site/xdoc/issue-tracking.xml | 2 +-
src/site/xdoc/mail-lists.xml | 2 +-
src/site/xdoc/pick.xml | 2 +-
src/site/xdoc/proposal.xml | 2 +-
src/site/xdoc/release_3_2.xml | 2 +-
src/site/xdoc/release_3_2_1.xml | 2 +-
src/site/xdoc/release_3_2_2.xml | 2 +-
src/site/xdoc/release_4_0.xml | 2 +-
src/site/xdoc/release_4_1.xml | 2 +-
src/site/xdoc/release_4_2.xml | 2 +-
src/site/xdoc/release_4_3.xml | 2 +-
src/site/xdoc/release_4_4.xml | 2 +-
src/site/xdoc/userguide.xml | 2 +-
18 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/site/xdoc/building.xml b/src/site/xdoc/building.xml
index 29a33f8a6c..504ffd3041 100644
--- a/src/site/xdoc/building.xml
+++ b/src/site/xdoc/building.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Building
Apache Commons Team
diff --git a/src/site/xdoc/compatibility.xml b/src/site/xdoc/compatibility.xml
index 7663e6a1eb..65d5728a0b 100644
--- a/src/site/xdoc/compatibility.xml
+++ b/src/site/xdoc/compatibility.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Compatibility
Apache Commons Team
diff --git a/src/site/xdoc/download_collections.xml b/src/site/xdoc/download_collections.xml
index c04d1ce314..789da0245e 100644
--- a/src/site/xdoc/download_collections.xml
+++ b/src/site/xdoc/download_collections.xml
@@ -58,7 +58,7 @@ limitations under the License.
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Download Apache Commons Collections
Apache Commons Team
diff --git a/src/site/xdoc/history.xml b/src/site/xdoc/history.xml
index 5cdffe4bd8..9dbca3f23c 100644
--- a/src/site/xdoc/history.xml
+++ b/src/site/xdoc/history.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
History
Apache Commons Team
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 9b2609847c..aa7af2ae4e 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Home
Apache Commons Team
diff --git a/src/site/xdoc/issue-tracking.xml b/src/site/xdoc/issue-tracking.xml
index 6f617d9a2c..f296f577a0 100644
--- a/src/site/xdoc/issue-tracking.xml
+++ b/src/site/xdoc/issue-tracking.xml
@@ -43,7 +43,7 @@ limitations under the License.
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Apache Commons Collections Issue tracking
Apache Commons Team
diff --git a/src/site/xdoc/mail-lists.xml b/src/site/xdoc/mail-lists.xml
index 58d28d1246..e59bf52bb5 100644
--- a/src/site/xdoc/mail-lists.xml
+++ b/src/site/xdoc/mail-lists.xml
@@ -41,7 +41,7 @@ limitations under the License.
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Apache Commons Collections Mailing Lists
Apache Commons Team
diff --git a/src/site/xdoc/pick.xml b/src/site/xdoc/pick.xml
index 392fad52b0..408f51dc7f 100644
--- a/src/site/xdoc/pick.xml
+++ b/src/site/xdoc/pick.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Choosing a collection
Apache Commons Team
diff --git a/src/site/xdoc/proposal.xml b/src/site/xdoc/proposal.xml
index f0a9481925..e936cfaf2e 100644
--- a/src/site/xdoc/proposal.xml
+++ b/src/site/xdoc/proposal.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Proposal
diff --git a/src/site/xdoc/release_3_2.xml b/src/site/xdoc/release_3_2.xml
index f729134ba9..e26d065ef0 100644
--- a/src/site/xdoc/release_3_2.xml
+++ b/src/site/xdoc/release_3_2.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for version 3.2
Apache Commons Team
diff --git a/src/site/xdoc/release_3_2_1.xml b/src/site/xdoc/release_3_2_1.xml
index 329d61d03e..1d486c3723 100644
--- a/src/site/xdoc/release_3_2_1.xml
+++ b/src/site/xdoc/release_3_2_1.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for version 3.2.1
Apache Commons Team
diff --git a/src/site/xdoc/release_3_2_2.xml b/src/site/xdoc/release_3_2_2.xml
index a4c9847c04..90ac6aae95 100644
--- a/src/site/xdoc/release_3_2_2.xml
+++ b/src/site/xdoc/release_3_2_2.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for version 3.2.2
Apache Commons Team
diff --git a/src/site/xdoc/release_4_0.xml b/src/site/xdoc/release_4_0.xml
index 122d5a2334..f101757346 100644
--- a/src/site/xdoc/release_4_0.xml
+++ b/src/site/xdoc/release_4_0.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for version 4.0
Apache Commons Team
diff --git a/src/site/xdoc/release_4_1.xml b/src/site/xdoc/release_4_1.xml
index ab372a377f..d5628cec0e 100644
--- a/src/site/xdoc/release_4_1.xml
+++ b/src/site/xdoc/release_4_1.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for version 4.1
Apache Commons Team
diff --git a/src/site/xdoc/release_4_2.xml b/src/site/xdoc/release_4_2.xml
index 89b1a4927a..757d3b2a55 100644
--- a/src/site/xdoc/release_4_2.xml
+++ b/src/site/xdoc/release_4_2.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for v4.2
Apache Commons Team
diff --git a/src/site/xdoc/release_4_3.xml b/src/site/xdoc/release_4_3.xml
index db6ac4433c..0d77a48097 100644
--- a/src/site/xdoc/release_4_3.xml
+++ b/src/site/xdoc/release_4_3.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for v4.3
Apache Commons Team
diff --git a/src/site/xdoc/release_4_4.xml b/src/site/xdoc/release_4_4.xml
index d1f668f889..de24fbdc44 100644
--- a/src/site/xdoc/release_4_4.xml
+++ b/src/site/xdoc/release_4_4.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
Release notes for v4.4
Apache Commons Team
diff --git a/src/site/xdoc/userguide.xml b/src/site/xdoc/userguide.xml
index 28cece2c26..07a96019bc 100644
--- a/src/site/xdoc/userguide.xml
+++ b/src/site/xdoc/userguide.xml
@@ -17,7 +17,7 @@
-->
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
User guide
Apache Commons Team
From 268ee340f0d0be4fa6f65ba1571fa7fd1c6e88e4 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 1 Jan 2026 12:53:57 +0000
Subject: [PATCH 23/53] Bump actions/upload-artifact from 5.0.0 to 6.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/330a01c490aca151604b8cf639adc76d48f6c5d4...b7c566a772e6b6bfb58ed0dc250532a479d7789f)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: 6.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
.github/workflows/scorecards-analysis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 4652677d02..ff3a7cfb9b 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -57,7 +57,7 @@ jobs:
publish_results: true
- name: "Upload artifact"
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: SARIF file
path: results.sarif
From 9f34893fb78269c3a9a9a89576bdaae676b66729 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 2 Jan 2026 17:06:34 -0500
Subject: [PATCH 24/53] Bump org.apache.commons:commons-parent from 93 to 94
---
pom.xml | 2 +-
src/changes/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index c51e26167d..d722763157 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
org.apache.commons
commons-parent
- 93
+ 94
4.0.0
commons-collections4
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8ffe49634a..2c5cb27791 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,7 +47,7 @@
Add a Maven benchmark profile for JMH.
Add a Maven benchmark profile for JMH.
- Bump org.apache.commons:commons-parent from 81 to 93 #612, #645, #662, #663.
+ Bump org.apache.commons:commons-parent from 81 to 94 #612, #645, #662, #663.
Bump com.google.guava:guava-testlib from 33.3.1-jre to 33.5.0-jre #644.
Bump PMD from 7.8.0 to 7.13.0 (now inherited from parent POM).
Bump org.easymock:easymock from 5.5.0 to 5.6.0 #617.
From 2bed7c70a2cd38cfc965079f7273888e46ca54b0 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 2 Jan 2026 18:21:02 -0500
Subject: [PATCH 25/53] Javadoc
---
.../apache/commons/collections4/functors/AbstractPredicate.java | 2 +-
.../collections4/functors/AbstractQuantifierPredicate.java | 2 +-
.../org/apache/commons/collections4/sequence/EditCommand.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java
index 5b7e409173..34a824df6a 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java
@@ -19,7 +19,7 @@
import org.apache.commons.collections4.Predicate;
/**
- * Abstract base class for predicates.
+ * Abstrac class for predicates.
*
* @param the type of the input to the predicate.
* @since 4.5.0-M3
diff --git a/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java
index c8b902aa04..cd0ee6219c 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java
@@ -21,7 +21,7 @@
import org.apache.commons.collections4.Predicate;
/**
- * Abstract base class for quantification predicates, for example All, Any, None.
+ * Abstrac class for quantification predicates, for example All, Any, None.
*
* @param the type of the input to the predicate.
* @since 4.0
diff --git a/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java b/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java
index 5bdff115e5..0c76014199 100644
--- a/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java
+++ b/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java
@@ -17,7 +17,7 @@
package org.apache.commons.collections4.sequence;
/**
- * Abstract base class for all commands used to transform an objects sequence
+ * Abstrac class for all commands used to transform an objects sequence
* into another one.
*
* When two objects sequences are compared through the
From 9213396e69133e8ffff41b4abe44d6ffb8b59999 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 2 Jan 2026 18:35:13 -0500
Subject: [PATCH 26/53] Javadoc
---
.../apache/commons/collections4/functors/AbstractPredicate.java | 2 +-
.../collections4/functors/AbstractQuantifierPredicate.java | 2 +-
.../org/apache/commons/collections4/sequence/EditCommand.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java
index 34a824df6a..d091bd6321 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AbstractPredicate.java
@@ -19,7 +19,7 @@
import org.apache.commons.collections4.Predicate;
/**
- * Abstrac class for predicates.
+ * Abstract class for predicates.
*
* @param the type of the input to the predicate.
* @since 4.5.0-M3
diff --git a/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java
index cd0ee6219c..062799ddfb 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AbstractQuantifierPredicate.java
@@ -21,7 +21,7 @@
import org.apache.commons.collections4.Predicate;
/**
- * Abstrac class for quantification predicates, for example All, Any, None.
+ * Abstract class for quantification predicates, for example All, Any, None.
*
* @param the type of the input to the predicate.
* @since 4.0
diff --git a/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java b/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java
index 0c76014199..8e3d92d8c8 100644
--- a/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java
+++ b/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java
@@ -17,7 +17,7 @@
package org.apache.commons.collections4.sequence;
/**
- * Abstrac class for all commands used to transform an objects sequence
+ * Abstract class for all commands used to transform an objects sequence
* into another one.
*
* When two objects sequences are compared through the
From e74b48b03b275b6d8f6b7d29c9bd4c4c6d14def6 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sun, 4 Jan 2026 11:04:47 -0500
Subject: [PATCH 27/53] Remove old comments
---
.../java/org/apache/commons/collections4/IteratorUtils.java | 1 -
src/main/java/org/apache/commons/collections4/SetUtils.java | 1 -
.../commons/collections4/comparators/ComparatorChain.java | 2 +-
.../collections4/comparators/FixedOrderComparator.java | 4 ----
.../commons/collections4/iterators/EnumerationIterator.java | 2 --
.../org/apache/commons/collections4/map/SingletonMap.java | 3 ---
.../org/apache/commons/collections4/AbstractObjectTest.java | 1 -
.../collections4/collection/AbstractCollectionTest.java | 1 -
.../collections4/multimap/AbstractMultiValuedMapTest.java | 1 -
9 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
index cf27afb197..ed65c964f1 100644
--- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
@@ -392,7 +392,6 @@ public static Iterable asMultipleUseIterable(final Iterator extends E>
return new IteratorIterable<>(iterator, true);
}
- // Bounded
/**
* Decorates the specified iterator to return at most the given number
* of elements.
diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java
index a6029f9d15..9b77528dfa 100644
--- a/src/main/java/org/apache/commons/collections4/SetUtils.java
+++ b/src/main/java/org/apache/commons/collections4/SetUtils.java
@@ -480,7 +480,6 @@ public static Set synchronizedSet(final Set set) {
return Collections.synchronizedSet(set);
}
- // SortedSet
/**
* Returns a synchronized sorted set backed by the given sorted set.
*
diff --git a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
index 5916d5b74b..6e42f29355 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
@@ -60,7 +60,7 @@ public class ComparatorChain implements Comparator, Serializable {
private final List> comparatorChain;
/** Order - false (clear) = ascend; true (set) = descend. */
private final BitSet orderingBits;
- /** Whether the chain has been "locked". */
+ /** Whether the chain has been "locked". */
private boolean isLocked;
/**
diff --git a/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java b/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
index 42490a70f0..fa9b3a25a6 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
@@ -90,7 +90,6 @@ public enum UnknownObjectBehavior {
/** The behavior in the case of an unknown object */
private UnknownObjectBehavior unknownObjectBehavior = UnknownObjectBehavior.EXCEPTION;
- // Constructors
/**
* Constructs an empty FixedOrderComparator.
*/
@@ -127,7 +126,6 @@ public FixedOrderComparator(final T... items) {
}
}
- // Methods for adding items
/**
* Adds an item, which compares as after all items known to the Comparator.
* If the item is already known to the Comparator, its old position is
@@ -178,7 +176,6 @@ protected void checkLocked() {
}
}
- // Comparator methods
/**
* Compares two objects according to the order of this Comparator.
*
@@ -245,7 +242,6 @@ public int hashCode() {
return Objects.hash(counter, isLocked, map, unknownObjectBehavior);
}
- // Bean methods / state querying methods
/**
* Returns true if modifications cannot be made to the FixedOrderComparator.
* FixedOrderComparators cannot be modified once they have performed a comparison.
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EnumerationIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EnumerationIterator.java
index 95333b4078..4030569e7e 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EnumerationIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EnumerationIterator.java
@@ -36,7 +36,6 @@ public class EnumerationIterator implements Iterator {
/** The last object retrieved */
private E last;
- // Constructors
/**
* Constructs a new {@code EnumerationIterator} that will not
* function until {@link #setEnumeration(Enumeration)} is called.
@@ -77,7 +76,6 @@ public Enumeration extends E> getEnumeration() {
return enumeration;
}
- // Iterator interface
/**
* Returns true if the underlying enumeration has more elements.
*
diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
index b70367ca0b..c8a29a8ae2 100644
--- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
@@ -336,7 +336,6 @@ public K firstKey() {
return getKey();
}
- // Map
/**
* Gets the value mapped to the key specified.
*
@@ -351,7 +350,6 @@ public V get(final Object key) {
return null;
}
- // KeyValue
/**
* Gets the key.
*
@@ -413,7 +411,6 @@ protected boolean isEqualValue(final Object value) {
return Objects.equals(value, getValue());
}
- // BoundedMap
/**
* Is the map currently full, always true.
*
diff --git a/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java b/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java
index db2eaa5cbc..4a31e6e848 100644
--- a/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java
+++ b/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java
@@ -74,7 +74,6 @@ protected String getCanonicalFullCollectionName(final Object object) {
return retval.toString();
}
- // protected implementation
/**
* Gets the version of Collections that this object tries to
* maintain serialization compatibility with. Defaults to 4, due to
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 425b83b007..1645d72c13 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -578,7 +578,6 @@ public void setConfirmed(final Collection confirmed) {
this.confirmed = confirmed;
}
- // Tests
/**
* Tests {@link Collection#add(Object)}.
*/
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 ff6a7b152e..f6ec78ce00 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
@@ -435,7 +435,6 @@ public BulkTest bulkTestAsMap() {
return new MultiValuedMapAsMapTest();
}
- // Bulk Tests
/**
* Bulk test {@link MultiValuedMap#entries()}. This method runs through all
* of the tests in {@link AbstractCollectionTest}. After modification
From 86e97e6d336ff00b8bea697041da0a4d7172e0db Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sun, 4 Jan 2026 11:22:38 -0500
Subject: [PATCH 28/53] Javadoc
Add an empty line before a Javadoc comment
---
.../org/apache/commons/collections4/Equator.java | 1 +
.../apache/commons/collections4/IterableGet.java | 1 +
.../apache/commons/collections4/IteratorUtils.java | 1 +
.../commons/collections4/bag/SynchronizedBag.java | 1 +
.../collections4/bidimap/AbstractDualBidiMap.java | 2 ++
.../collections4/bidimap/DualTreeBidiMap.java | 1 +
.../commons/collections4/bidimap/TreeBidiMap.java | 11 +++++++++++
.../collections4/bloomfilter/CellExtractor.java | 2 ++
.../collection/SynchronizedCollection.java | 1 +
.../collections4/comparators/ComparatorChain.java | 2 ++
.../commons/collections4/functors/AndPredicate.java | 1 +
.../commons/collections4/functors/ForClosure.java | 1 +
.../commons/collections4/functors/IfClosure.java | 2 ++
.../collections4/functors/IfTransformer.java | 2 ++
.../collections4/functors/InstantiateFactory.java | 3 +++
.../functors/InstantiateTransformer.java | 1 +
.../collections4/functors/InvokerTransformer.java | 2 ++
.../commons/collections4/functors/OrPredicate.java | 1 +
.../collections4/functors/PrototypeFactory.java | 1 +
.../collections4/functors/SwitchClosure.java | 2 ++
.../collections4/functors/SwitchTransformer.java | 2 ++
.../commons/collections4/functors/WhileClosure.java | 2 ++
.../collections4/iterators/ArrayIterator.java | 3 +++
.../collections4/iterators/EnumerationIterator.java | 2 ++
.../collections4/iterators/ListIteratorWrapper.java | 3 +++
.../collections4/iterators/LoopingIterator.java | 1 +
.../collections4/iterators/LoopingListIterator.java | 1 +
.../collections4/iterators/NodeListIterator.java | 1 +
.../collections4/iterators/ObjectArrayIterator.java | 3 +++
.../collections4/iterators/ObjectGraphIterator.java | 5 +++++
.../collections4/iterators/ReverseListIterator.java | 2 ++
.../collections4/iterators/SingletonIterator.java | 3 +++
.../collections4/iterators/TransformIterator.java | 1 +
.../collections4/keyvalue/AbstractKeyValue.java | 1 +
.../collections4/list/AbstractLinkedList.java | 2 ++
.../collections4/list/AbstractLinkedListJava21.java | 6 ++++++
.../collections4/list/CursorableLinkedList.java | 3 +++
.../apache/commons/collections4/list/TreeList.java | 13 +++++++++++++
.../commons/collections4/map/AbstractHashedMap.java | 1 +
.../commons/collections4/map/AbstractLinkedMap.java | 2 ++
.../collections4/map/AbstractReferenceMap.java | 4 ++++
.../commons/collections4/map/CompositeMap.java | 1 +
.../map/ConcurrentReferenceHashMap.java | 4 ++++
.../apache/commons/collections4/map/Flat3Map.java | 1 +
.../org/apache/commons/collections4/map/LRUMap.java | 2 ++
.../commons/collections4/map/MultiValueMap.java | 1 +
.../commons/collections4/map/SingletonMap.java | 1 +
.../commons/collections4/map/TransformedMap.java | 1 +
.../collections4/multiset/AbstractMapMultiSet.java | 2 ++
.../collections4/multiset/SynchronizedMultiSet.java | 1 +
.../collections4/sequence/SequencesComparator.java | 1 +
.../collections4/splitmap/TransformedSplitMap.java | 1 +
.../collections4/trie/AbstractPatriciaTrie.java | 2 ++
.../commons/collections4/FactoryUtilsTest.java | 1 +
.../bloomfilter/AbstractCellExtractorTest.java | 1 +
.../bloomfilter/AbstractIndexExtractorTest.java | 1 +
.../bloomfilter/LayeredBloomFilterTest.java | 1 +
.../collections4/bloomfilter/TestingHashers.java | 1 +
.../collection/CompositeCollectionTest.java | 2 ++
.../functors/AbstractMockPredicateTest.java | 1 +
.../iterators/ExtendedIteratorTest.java | 1 +
.../collections4/list/SetUniqueListTest.java | 1 +
.../commons/collections4/map/AbstractMapTest.java | 1 +
.../commons/collections4/map/EmptyMapMutator.java | 1 +
64 files changed, 130 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/Equator.java b/src/main/java/org/apache/commons/collections4/Equator.java
index c43ab1d748..9d99322ffc 100644
--- a/src/main/java/org/apache/commons/collections4/Equator.java
+++ b/src/main/java/org/apache/commons/collections4/Equator.java
@@ -27,6 +27,7 @@
* @since 4.0
*/
public interface Equator {
+
/**
* Evaluates the two arguments for their equality.
*
diff --git a/src/main/java/org/apache/commons/collections4/IterableGet.java b/src/main/java/org/apache/commons/collections4/IterableGet.java
index 85aca7634b..0c3b893729 100644
--- a/src/main/java/org/apache/commons/collections4/IterableGet.java
+++ b/src/main/java/org/apache/commons/collections4/IterableGet.java
@@ -25,6 +25,7 @@
* @see Put
*/
public interface IterableGet extends Get {
+
/**
* Obtains a {@code MapIterator} over the map.
*
diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
index ed65c964f1..6a7e53d0de 100644
--- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
@@ -112,6 +112,7 @@ public class IteratorUtils {
*/
@SuppressWarnings("rawtypes")
public static final OrderedMapIterator EMPTY_ORDERED_MAP_ITERATOR = EmptyOrderedMapIterator.INSTANCE;
+
/**
* Default delimiter used to delimit elements while converting an Iterator
* to its String representation.
diff --git a/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java b/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java
index 5990e1a830..ea95fb28ff 100644
--- a/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java
@@ -41,6 +41,7 @@ public class SynchronizedBag extends SynchronizedCollection implements Bag
* Synchronized Set for the Bag class.
*/
final class SynchronizedBagSet extends SynchronizedCollection implements Set {
+
/** Serialization version */
private static final long serialVersionUID = 2990565892366827855L;
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
index f22501b846..333179cc4a 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
@@ -747,6 +747,7 @@ public boolean isEmpty() {
}
// Map views
+
/**
* Gets a keySet view of the map.
* Changes made on the view are reflected in the map.
@@ -763,6 +764,7 @@ public Set keySet() {
}
// BidiMap
+
/**
* Obtains a {@code MapIterator} over the map.
* The iterator implements {@link BidiMapIterator}.
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java
index e897be87b2..e1fcbe5c94 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap.java
@@ -173,6 +173,7 @@ public String toString() {
* @param the type of the values.
*/
protected static class ViewMap extends AbstractSortedMapDecorator {
+
/**
* Constructs a new instance.
*
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
index 2524c11a96..f04dcf93a9 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
@@ -120,12 +120,16 @@ abstract class AbstractViewIterator {
/** Whether to return KEY or VALUE order. */
private final DataElement orderType;
+
/** The last node returned by the iterator. */
Node lastReturnedNode;
+
/** The next node to be returned by the iterator. */
private Node nextNode;
+
/** The previous node in the sequence returned by the iterator. */
private Node previousNode;
+
/** The modification count. */
private int expectedModifications;
@@ -216,6 +220,7 @@ public String toString() {
return description;
}
}
+
/**
* A view of this map.
*/
@@ -256,6 +261,7 @@ public boolean remove(final Object obj) {
return false;
}
}
+
/**
* The inverse map implementation.
*/
@@ -263,8 +269,10 @@ final class Inverse implements OrderedBidiMap