From 8e09f5f538db789ba72b52b39c56e7b111f142d5 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 28 Dec 2017 13:22:24 -0700 Subject: [PATCH] Javadoc: Add missing @param tags for generics. --- src/main/java/org/apache/commons/collections4/Bag.java | 2 +- src/main/java/org/apache/commons/collections4/SortedBag.java | 2 +- .../apache/commons/collections4/bag/AbstractBagDecorator.java | 1 + .../org/apache/commons/collections4/bag/AbstractMapBag.java | 1 + .../commons/collections4/bag/AbstractSortedBagDecorator.java | 1 + .../java/org/apache/commons/collections4/bag/CollectionBag.java | 2 +- .../apache/commons/collections4/bag/CollectionSortedBag.java | 1 + src/main/java/org/apache/commons/collections4/bag/HashBag.java | 1 + .../java/org/apache/commons/collections4/bag/PredicatedBag.java | 1 + .../apache/commons/collections4/bag/PredicatedSortedBag.java | 1 + .../org/apache/commons/collections4/bag/SynchronizedBag.java | 1 + .../apache/commons/collections4/bag/SynchronizedSortedBag.java | 1 + .../org/apache/commons/collections4/bag/TransformedBag.java | 1 + .../apache/commons/collections4/bag/TransformedSortedBag.java | 1 + src/main/java/org/apache/commons/collections4/bag/TreeBag.java | 1 + .../org/apache/commons/collections4/bag/UnmodifiableBag.java | 1 + .../apache/commons/collections4/bag/UnmodifiableSortedBag.java | 1 + 17 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/Bag.java b/src/main/java/org/apache/commons/collections4/Bag.java index 96c194309..c6d9781bb 100644 --- a/src/main/java/org/apache/commons/collections4/Bag.java +++ b/src/main/java/org/apache/commons/collections4/Bag.java @@ -38,7 +38,7 @@ import java.util.Set; * In an ideal world, the interface would be changed to fix the problems, however * it has been decided to maintain backwards compatibility instead. * - * @param the type held in the bag + * @param the type of elements in this bag * @since 2.0 */ public interface Bag extends Collection { diff --git a/src/main/java/org/apache/commons/collections4/SortedBag.java b/src/main/java/org/apache/commons/collections4/SortedBag.java index 15c5feb20..24324b0f5 100644 --- a/src/main/java/org/apache/commons/collections4/SortedBag.java +++ b/src/main/java/org/apache/commons/collections4/SortedBag.java @@ -22,7 +22,7 @@ import java.util.Comparator; * Defines a type of Bag that maintains a sorted order among * its unique representative members. * - * @param the type to iterate over + * @param the type of elements in this bag * @since 2.0 */ public interface SortedBag extends Bag { 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 3c952afb9..99e4d6dad 100644 --- a/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java +++ b/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java @@ -26,6 +26,7 @@ import org.apache.commons.collections4.collection.AbstractCollectionDecorator; *

* Methods are forwarded directly to the decorated bag. * + * @param the type of elements in this bag * @since 3.0 */ public abstract class 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 0d01270c4..8b7152e95 100644 --- a/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java @@ -38,6 +38,7 @@ import org.apache.commons.collections4.set.UnmodifiableSet; * map will be used to map bag elements to a number; the number represents the * number of occurrences of that element in the bag. * + * @param the type of elements in this bag * @since 3.0 (previously DefaultMapBag v2.0) */ public abstract class AbstractMapBag implements Bag { 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 187fc9574..99424fb1f 100644 --- a/src/main/java/org/apache/commons/collections4/bag/AbstractSortedBagDecorator.java +++ b/src/main/java/org/apache/commons/collections4/bag/AbstractSortedBagDecorator.java @@ -25,6 +25,7 @@ import org.apache.commons.collections4.SortedBag; *

* Methods are forwarded directly to the decorated bag. * + * @param the type of elements in this bag * @since 3.0 */ public abstract class AbstractSortedBagDecorator diff --git a/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java b/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java index 7fbe3460f..c27d0090d 100644 --- a/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java @@ -34,7 +34,7 @@ import org.apache.commons.collections4.Bag; * The method javadoc highlights the differences compared to the original Bag interface. * * @see Bag - * @param the type held in the bag + * @param the type of elements in this bag * @since 4.0 */ public final class CollectionBag extends AbstractBagDecorator { diff --git a/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java index 88a4c76da..ef433e5f6 100644 --- a/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java @@ -27,6 +27,7 @@ import org.apache.commons.collections4.SortedBag; /** * Decorates another {@link SortedBag} to comply with the Collection contract. * + * @param the type of elements in this bag * @since 4.0 */ public final class CollectionSortedBag extends AbstractSortedBagDecorator { diff --git a/src/main/java/org/apache/commons/collections4/bag/HashBag.java b/src/main/java/org/apache/commons/collections4/bag/HashBag.java index 9fca8421f..33adb1f66 100644 --- a/src/main/java/org/apache/commons/collections4/bag/HashBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/HashBag.java @@ -33,6 +33,7 @@ import java.util.HashMap; * interface javadoc carefully as several methods violate the * {@link Collection} interface specification. * + * @param the type of elements in this bag * @since 3.0 (previously in main package v2.0) */ public class HashBag extends AbstractMapBag implements Serializable { diff --git a/src/main/java/org/apache/commons/collections4/bag/PredicatedBag.java b/src/main/java/org/apache/commons/collections4/bag/PredicatedBag.java index c79715aaf..bc69ad4fc 100644 --- a/src/main/java/org/apache/commons/collections4/bag/PredicatedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/PredicatedBag.java @@ -37,6 +37,7 @@ import org.apache.commons.collections4.collection.PredicatedCollection; *

* This class is Serializable from Commons Collections 3.1. * + * @param the type of elements in this bag * @since 3.0 */ public class PredicatedBag extends PredicatedCollection implements Bag { diff --git a/src/main/java/org/apache/commons/collections4/bag/PredicatedSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/PredicatedSortedBag.java index 6524ee578..124d49ca2 100644 --- a/src/main/java/org/apache/commons/collections4/bag/PredicatedSortedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/PredicatedSortedBag.java @@ -36,6 +36,7 @@ import org.apache.commons.collections4.SortedBag; *

* This class is Serializable from Commons Collections 3.1. * + * @param the type of elements in this bag * @since 3.0 */ public class PredicatedSortedBag extends PredicatedBag implements SortedBag { 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 6e2009b5b..362245f8e 100644 --- a/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/SynchronizedBag.java @@ -30,6 +30,7 @@ import org.apache.commons.collections4.collection.SynchronizedCollection; *

* This class is Serializable from Commons Collections 3.1. * + * @param the type of elements in this bag * @since 3.0 */ public class SynchronizedBag extends SynchronizedCollection implements Bag { diff --git a/src/main/java/org/apache/commons/collections4/bag/SynchronizedSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/SynchronizedSortedBag.java index 6d14ce1bc..6dae8d456 100644 --- a/src/main/java/org/apache/commons/collections4/bag/SynchronizedSortedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/SynchronizedSortedBag.java @@ -30,6 +30,7 @@ import org.apache.commons.collections4.SortedBag; *

* This class is Serializable from Commons Collections 3.1. * + * @param the type of elements in this bag * @since 3.0 */ public class SynchronizedSortedBag extends SynchronizedBag implements SortedBag { diff --git a/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java b/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java index 9298d620b..34aa6e9f2 100644 --- a/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/TransformedBag.java @@ -33,6 +33,7 @@ import org.apache.commons.collections4.set.TransformedSet; *

* This class is Serializable from Commons Collections 3.1. * + * @param the type of elements in this bag * @since 3.0 */ public class TransformedBag extends TransformedCollection implements Bag { diff --git a/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java index c723a789c..d33732e24 100644 --- a/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/TransformedSortedBag.java @@ -31,6 +31,7 @@ import org.apache.commons.collections4.Transformer; *

* This class is Serializable from Commons Collections 3.1. * + * @param the type of elements in this bag * @since 3.0 */ public class TransformedSortedBag extends TransformedBag implements SortedBag { diff --git a/src/main/java/org/apache/commons/collections4/bag/TreeBag.java b/src/main/java/org/apache/commons/collections4/bag/TreeBag.java index 084b21cbc..715871b97 100644 --- a/src/main/java/org/apache/commons/collections4/bag/TreeBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/TreeBag.java @@ -38,6 +38,7 @@ import org.apache.commons.collections4.SortedBag; * copies of an object to be added or removed at once. It is important to read the interface * javadoc carefully as several methods violate the {@link Collection} interface specification. * + * @param the type of elements in this bag * @since 3.0 (previously in main package v2.0) */ public class TreeBag extends AbstractMapBag implements SortedBag, Serializable { diff --git a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java index 52fe51ff7..9100a6154 100644 --- a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java @@ -35,6 +35,7 @@ import org.apache.commons.collections4.set.UnmodifiableSet; *

* Attempts to modify it will result in an UnsupportedOperationException. * + * @param the type of elements in this bag * @since 3.0 */ public final class UnmodifiableBag diff --git a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java index 7ea2c9468..c07e13458 100644 --- a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java +++ b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java @@ -35,6 +35,7 @@ import org.apache.commons.collections4.set.UnmodifiableSet; *

* Attempts to modify it will result in an UnsupportedOperationException. * + * @param the type of elements in this bag * @since 3.0 */ public final class UnmodifiableSortedBag