diff --git a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListForJava21.java b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListForJava21.java index b6563597db..e1f854f3ca 100644 --- a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListForJava21.java +++ b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListForJava21.java @@ -404,6 +404,9 @@ public void remove() { *

* From Commons Collections 3.1, all access to the {@code value} property * is via the methods on this class. + *

+ * + * @param the type of the node value. */ protected static class Node { 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 d29f214d6f..086f94f6cb 100644 --- a/src/main/java/org/apache/commons/collections4/list/AbstractListDecorator.java +++ b/src/main/java/org/apache/commons/collections4/list/AbstractListDecorator.java @@ -28,11 +28,10 @@ * Methods are forwarded directly to the decorated list. *

* - * @param the type of the elements in the list + * @param the type of the elements in the list. * @since 3.0 */ -public abstract class AbstractListDecorator extends AbstractCollectionDecorator - implements List { +public abstract class AbstractListDecorator extends AbstractCollectionDecorator implements List { /** Serialization version--necessary in an abstract class? */ private static final long serialVersionUID = 4500739654952315623L; diff --git a/src/main/java/org/apache/commons/collections4/list/AbstractSerializableListDecorator.java b/src/main/java/org/apache/commons/collections4/list/AbstractSerializableListDecorator.java index 890bb00d13..b3afa870a8 100644 --- a/src/main/java/org/apache/commons/collections4/list/AbstractSerializableListDecorator.java +++ b/src/main/java/org/apache/commons/collections4/list/AbstractSerializableListDecorator.java @@ -25,10 +25,10 @@ /** * Serializable subclass of AbstractListDecorator. * + * @param the type of the elements in the list. * @since 3.1 */ -public abstract class AbstractSerializableListDecorator - extends AbstractListDecorator { +public abstract class AbstractSerializableListDecorator extends AbstractListDecorator { /** Serialization version */ private static final long serialVersionUID = 2684959196747496299L; diff --git a/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java b/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java index cb91d79ba5..285098ff7c 100644 --- a/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java +++ b/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java @@ -55,6 +55,7 @@ * Note that this implementation is not synchronized. *

* + * @param the type of the elements in the list. * @see java.util.LinkedList * @since 1.0 * @deprecated parent {@link AbstractLinkedList} is source incompatible with List methods added in Java 21 diff --git a/src/main/java/org/apache/commons/collections4/list/GrowthList.java b/src/main/java/org/apache/commons/collections4/list/GrowthList.java index b42d16e78e..9880e75910 100644 --- a/src/main/java/org/apache/commons/collections4/list/GrowthList.java +++ b/src/main/java/org/apache/commons/collections4/list/GrowthList.java @@ -54,6 +54,7 @@ * can be used together by decorating twice. *

* + * @param the type of the elements in the list. * @see LazyList * @since 3.2 */ diff --git a/src/main/java/org/apache/commons/collections4/list/LazyList.java b/src/main/java/org/apache/commons/collections4/list/LazyList.java index 70ccd78d9d..fe92de692c 100644 --- a/src/main/java/org/apache/commons/collections4/list/LazyList.java +++ b/src/main/java/org/apache/commons/collections4/list/LazyList.java @@ -61,6 +61,7 @@ * This class is Serializable from Commons Collections 3.1. *

* + * @param the type of the elements in the list. * @see GrowthList * @since 3.0 */ diff --git a/src/main/java/org/apache/commons/collections4/list/NodeCachingLinkedList.java b/src/main/java/org/apache/commons/collections4/list/NodeCachingLinkedList.java index d267737cb5..57945b0b1b 100644 --- a/src/main/java/org/apache/commons/collections4/list/NodeCachingLinkedList.java +++ b/src/main/java/org/apache/commons/collections4/list/NodeCachingLinkedList.java @@ -39,6 +39,7 @@ * Note that this implementation is not synchronized. *

* + * @param the type of the elements in the list. * @since 3.0 * @deprecated parent {@link AbstractLinkedList} is source incompatible with List methods added in Java 21 */ diff --git a/src/main/java/org/apache/commons/collections4/list/PredicatedList.java b/src/main/java/org/apache/commons/collections4/list/PredicatedList.java index aa7a5e3d8d..f8c0f191a4 100644 --- a/src/main/java/org/apache/commons/collections4/list/PredicatedList.java +++ b/src/main/java/org/apache/commons/collections4/list/PredicatedList.java @@ -45,6 +45,7 @@ * This class is Serializable from Commons Collections 3.1. *

* + * @param the type of the elements in the list. * @since 3.0 */ public class PredicatedList extends PredicatedCollection implements List { diff --git a/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java b/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java index ff9a9f68c0..2f7d318f9e 100644 --- a/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java +++ b/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java @@ -51,6 +51,7 @@ * This class is Serializable from Commons Collections 3.1. *

* + * @param the type of the elements in the list. * @since 3.0 */ public class SetUniqueList extends AbstractSerializableListDecorator { diff --git a/src/main/java/org/apache/commons/collections4/list/TransformedList.java b/src/main/java/org/apache/commons/collections4/list/TransformedList.java index e1860fb3a4..8826695d0e 100644 --- a/src/main/java/org/apache/commons/collections4/list/TransformedList.java +++ b/src/main/java/org/apache/commons/collections4/list/TransformedList.java @@ -36,6 +36,7 @@ * This class is Serializable from Commons Collections 3.1. *

* + * @param the type of the elements in the list. * @since 3.0 */ public class TransformedList extends TransformedCollection implements List { diff --git a/src/main/java/org/apache/commons/collections4/list/TreeList.java b/src/main/java/org/apache/commons/collections4/list/TreeList.java index e5760db53d..82abbe640a 100644 --- a/src/main/java/org/apache/commons/collections4/list/TreeList.java +++ b/src/main/java/org/apache/commons/collections4/list/TreeList.java @@ -59,6 +59,7 @@ * does use slightly more memory. *

* + * @param the type of the elements in the list. * @since 3.1 */ public class TreeList extends AbstractList { diff --git a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java index 291f22410b..9aadb13b72 100644 --- a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java +++ b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java @@ -35,6 +35,7 @@ * Attempts to modify it will result in an UnsupportedOperationException. *

* + * @param the type of the elements in the list. * @since 3.0 */ public final class UnmodifiableList 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 65e01b1717..0d9cd28050 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java @@ -36,13 +36,15 @@ * number of occurrences of that element in the multiset. *

* - * @param the type held in the multiset + * @param the type held in the multiset. * @since 4.1 */ public abstract class AbstractMapMultiSet extends AbstractMultiSet { /** * Inner class EntrySetIterator. + * + * @param the element type. */ protected static class EntrySetIterator implements Iterator> { @@ -154,8 +156,11 @@ public void remove() { canRemove = false; } } + /** * Inner class MultiSetEntry. + * + * @param the key type. */ protected static class MultiSetEntry extends AbstractEntry { @@ -211,6 +216,8 @@ public int hashCode() { /** * Inner class UniqueSetIterator. + * + * @param the element type. */ protected static class UniqueSetIterator extends AbstractIteratorDecorator { diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java index 822da4a64a..88695f80a8 100644 --- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java +++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java @@ -41,6 +41,8 @@ public abstract class AbstractMultiSet extends AbstractCollection implemen /** * Inner class AbstractEntry. + * + * @param the element type. */ protected abstract static class AbstractEntry implements Entry { @@ -68,8 +70,11 @@ public String toString() { return String.format("%s:%d", getElement(), getCount()); } } + /** * Inner class EntrySet. + * + * @param the element type. */ protected static class EntrySet extends AbstractSet> { @@ -180,6 +185,8 @@ public void remove() { /** * Inner class UniqueSet. + * + * @param the element type. */ protected static class UniqueSet extends AbstractSet { diff --git a/src/main/java/org/apache/commons/collections4/sequence/CommandVisitor.java b/src/main/java/org/apache/commons/collections4/sequence/CommandVisitor.java index 001b4d42b8..e0535f8568 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/CommandVisitor.java +++ b/src/main/java/org/apache/commons/collections4/sequence/CommandVisitor.java @@ -118,6 +118,7 @@ * } * * + * @param the type of the input to the visit operations. * @since 4.0 */ public interface CommandVisitor { diff --git a/src/main/java/org/apache/commons/collections4/sequence/DeleteCommand.java b/src/main/java/org/apache/commons/collections4/sequence/DeleteCommand.java index 9af8cebb5d..26fbdb7789 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/DeleteCommand.java +++ b/src/main/java/org/apache/commons/collections4/sequence/DeleteCommand.java @@ -26,9 +26,9 @@ * these type of commands always come from the first sequence. *

* + * @param the type of object to apply this command. * @see SequencesComparator * @see EditScript - * * @since 4.0 */ public class DeleteCommand extends EditCommand { 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 8c64893ab3..f32c029d2a 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java +++ b/src/main/java/org/apache/commons/collections4/sequence/EditCommand.java @@ -41,9 +41,9 @@ * and the {@code equals} method is specialized. *

* + * @param the type of object to apply this command. * @see SequencesComparator * @see EditScript - * * @since 4.0 */ public abstract class EditCommand { diff --git a/src/main/java/org/apache/commons/collections4/sequence/EditScript.java b/src/main/java/org/apache/commons/collections4/sequence/EditScript.java index 81fe66ce82..f941fbe6c6 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/EditScript.java +++ b/src/main/java/org/apache/commons/collections4/sequence/EditScript.java @@ -37,11 +37,11 @@ * method is specialized. *

* + * @param the type of object to apply commands. * @see SequencesComparator * @see EditCommand * @see CommandVisitor * @see ReplacementsHandler - * * @since 4.0 */ public class EditScript { diff --git a/src/main/java/org/apache/commons/collections4/sequence/InsertCommand.java b/src/main/java/org/apache/commons/collections4/sequence/InsertCommand.java index 4afb30bd61..b9ba2b1452 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/InsertCommand.java +++ b/src/main/java/org/apache/commons/collections4/sequence/InsertCommand.java @@ -26,9 +26,9 @@ * these type of commands always come from the second sequence. *

* + * @param the type of object to apply this command. * @see SequencesComparator * @see EditScript - * * @since 4.0 */ public class InsertCommand extends EditCommand { diff --git a/src/main/java/org/apache/commons/collections4/sequence/KeepCommand.java b/src/main/java/org/apache/commons/collections4/sequence/KeepCommand.java index c259d0e3f6..2e5cad6fb3 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/KeepCommand.java +++ b/src/main/java/org/apache/commons/collections4/sequence/KeepCommand.java @@ -26,9 +26,9 @@ * these type of commands always come from the first sequence. *

* + * @param the type of object to apply this command. * @see SequencesComparator * @see EditScript - * * @since 4.0 */ public class KeepCommand extends EditCommand { diff --git a/src/main/java/org/apache/commons/collections4/sequence/ReplacementsFinder.java b/src/main/java/org/apache/commons/collections4/sequence/ReplacementsFinder.java index f4ba2a60e4..d0f62f2e9d 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/ReplacementsFinder.java +++ b/src/main/java/org/apache/commons/collections4/sequence/ReplacementsFinder.java @@ -43,17 +43,17 @@ * interface to process the sub-sequences. *

* + * @param the type of the input to the visit operations. * @see ReplacementsHandler * @see EditScript * @see SequencesComparator - * * @since 4.0 */ public class ReplacementsFinder implements CommandVisitor { private final List pendingInsertions; private final List pendingDeletions; - private int skipped; + private int skipped; /** Handler to call when synchronized sequences are found. */ private final ReplacementsHandler handler; @@ -65,9 +65,9 @@ public class ReplacementsFinder implements CommandVisitor { */ public ReplacementsFinder(final ReplacementsHandler handler) { pendingInsertions = new ArrayList<>(); - pendingDeletions = new ArrayList<>(); - skipped = 0; - this.handler = handler; + pendingDeletions = new ArrayList<>(); + skipped = 0; + this.handler = handler; } /** diff --git a/src/main/java/org/apache/commons/collections4/sequence/ReplacementsHandler.java b/src/main/java/org/apache/commons/collections4/sequence/ReplacementsHandler.java index 318f1792a1..f9159b990f 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/ReplacementsHandler.java +++ b/src/main/java/org/apache/commons/collections4/sequence/ReplacementsHandler.java @@ -21,6 +21,7 @@ /** * This interface is devoted to handle synchronized replacement sequences. * + * @param the type of elements in the lists. * @see ReplacementsFinder * @since 4.0 */ @@ -28,7 +29,7 @@ public interface ReplacementsHandler { /** - * Handle two synchronized sequences. + * Handles two synchronized sequences. *

* This method is called by a {@link ReplacementsFinder ReplacementsFinder} * instance when it has synchronized two sub-sequences of object arrays @@ -36,9 +37,11 @@ public interface ReplacementsHandler { * sequences are synchronized, the objects before the two sub-sequences are * equals (if they exist). This property also holds for the objects after * the two sub-sequences. + *

*

* The replacement is defined as replacing the {@code from} * sub-sequence into the {@code to} sub-sequence. + *

* * @param skipped number of tokens skipped since the last call (i.e. number of * tokens that were in both sequences), this number should be strictly positive diff --git a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java index 3a1fc25b0e..8d8a8de425 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java +++ b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java @@ -52,10 +52,10 @@ * needed to transform the first sequence into the second one. *

* + * @param the type of elements in the lists. * @see EditScript * @see EditCommand * @see CommandVisitor - * * @since 4.0 */ public class SequencesComparator { 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 54cca165c9..6816278c47 100644 --- a/src/main/java/org/apache/commons/collections4/set/CompositeSet.java +++ b/src/main/java/org/apache/commons/collections4/set/CompositeSet.java @@ -54,6 +54,8 @@ public class CompositeSet implements Set, Serializable { /** * Defines callbacks for mutation operations. + * + * @param the type of the elements in this instance. */ public interface SetMutator extends Serializable {