diff --git a/src/main/java/org/apache/commons/collections4/FluentIterable.java b/src/main/java/org/apache/commons/collections4/FluentIterable.java index ceae3427f..ae3af3635 100644 --- a/src/main/java/org/apache/commons/collections4/FluentIterable.java +++ b/src/main/java/org/apache/commons/collections4/FluentIterable.java @@ -36,7 +36,7 @@ import java.util.List; * new collection or array (e.g. toList()); *
  • utility methods which answer questions about the FluentIterable's * contents (e.g. size(), anyMatch(Predicate)). - *
  • + *
  • * *

    * The following example outputs the first 3 even numbers in the range [1, 10] @@ -279,6 +279,7 @@ public class FluentIterable implements Iterable { * Returns a new FluentIterable whose iterator will return all elements * of this iterable transformed by the provided transformer. * + * @param the output element type * @param transformer the transformer applied to each element * @return a new iterable, providing a transformed view of this iterable * @throws NullPointerException if transformer is null @@ -315,7 +316,7 @@ public class FluentIterable implements Iterable { * the elements of this iterable and the other iterable in * alternating order. * - * @param other the other iterable to interleave + * @param others the iterables to interleave * @return a new iterable, interleaving this iterable with others */ public FluentIterable zip(final Iterable... others) { @@ -394,7 +395,7 @@ public class FluentIterable implements Iterable { /** * Checks if the object is contained in this iterable. - * + * * @param object the object to check * @return true if the object is contained in this iterable, false otherwise */ @@ -447,7 +448,7 @@ public class FluentIterable implements Iterable { * Returns an array containing all elements of this iterable by traversing * its iterator. * - * @param arrayClass the class of array to create + * @param arrayClass the class of array to create * @return an array of the iterable contents * @throws ClassCastException if arrayClass is invalid */ diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java index 80577c7b8..9e967878d 100644 --- a/src/main/java/org/apache/commons/collections4/IterableUtils.java +++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java @@ -124,7 +124,6 @@ public class IterableUtils { @Override public Iterator iterator() { return new LazyIteratorChain() { - @Override protected Iterator nextIterator(int count) { if (count > iterables.length) { @@ -133,7 +132,6 @@ public class IterableUtils { return emptyIteratorIfNull(iterables[count - 1]); } } - }; } }; @@ -224,7 +222,7 @@ public class IterableUtils { @Override public Iterator iterator() { return IteratorUtils.boundedIterator(emptyIteratorIfNull(iterable), maxSize); - } + } }; } @@ -273,10 +271,9 @@ public class IterableUtils { /** * Returns a reversed view of the given iterable. *

    - * In case the provided iterable is a {@link List} instance, a + * In case the provided iterable is a {@link List} instance, a * {@link ReverseListIterator} will be used to reverse the traversal - * order, otherwise an intermediate {@link List} needs to be - * created. + * order, otherwise an intermediate {@link List} needs to be created. *

    * The returned iterable's iterator supports {@code remove()} if the * provided iterable is a {@link List} instance. @@ -323,7 +320,7 @@ public class IterableUtils { @Override public Iterator iterator() { return IteratorUtils.skippingIterator(emptyIteratorIfNull(iterable), elementsToSkip); - } + } }; } @@ -337,7 +334,8 @@ public class IterableUtils { * The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. * - * @param the element type + * @param the input element type + * @param the output element type * @param iterable the iterable to transform, may be null * @param transformer the transformer , must not be null * @return a transformed view of the specified iterable @@ -353,7 +351,7 @@ public class IterableUtils { @Override public Iterator iterator() { return IteratorUtils.transformedIterator(emptyIteratorIfNull(iterable), transformer); - } + } }; } @@ -374,7 +372,7 @@ public class IterableUtils { @Override public Iterator iterator() { return new UniqueFilterIterator(emptyIteratorIfNull(iterable)); - } + } }; } @@ -412,8 +410,7 @@ public class IterableUtils { * input iterator supports it. * * @param the element type - * @param a the first iterable - * @param b the second iterable + * @param iterables the array of iterables to interleave * @return a new iterable, interleaving the provided iterables */ public static Iterable zippingIterable(final Iterable... iterables) { @@ -426,7 +423,7 @@ public class IterableUtils { iterators[i] = emptyIteratorIfNull(iterables[i]); } return new ZippingIterator(iterators); - } + } }; } @@ -463,7 +460,7 @@ public class IterableUtils { * A null or empty iterable returns true. * * @param the type of object the {@link Iterable} contains - * @param input the {@link Iterable} to use, may be null + * @param iterable the {@link Iterable} to use, may be null * @param predicate the predicate to use, may not be null * @return true if every element of the collection matches the predicate or if the * collection is empty, false otherwise @@ -479,7 +476,7 @@ public class IterableUtils { * A null or empty iterable returns false. * * @param the type of object the {@link Iterable} contains - * @param input the {@link Iterable} to use, may be null + * @param iterable the {@link Iterable} to use, may be null * @param predicate the predicate to use, may not be null * @return true if any element of the collection matches the predicate, false otherwise * @throws NullPointerException if predicate is null @@ -493,7 +490,7 @@ public class IterableUtils { *

    * A null iterable returns true. * - * @param iterable the {@link Iterable to use}, may be null + * @param iterable the {@link Iterable to use}, may be null * @return true if the iterable is null or empty, false otherwise */ public static boolean isEmpty(final Iterable iterable) { @@ -510,7 +507,7 @@ public class IterableUtils { * A null or empty iterable returns false. * * @param the type of object the {@link Iterable} contains - * @param iterator the iterable to check, may be null + * @param iterable the iterable to check, may be null * @param object the object to check * @return true if the object is contained in the iterable, false otherwise */ diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java index 7c826f65a..2d0ea7521 100644 --- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java +++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java @@ -138,7 +138,7 @@ public class IteratorUtils { /** * IteratorUtils is not normally instantiated. */ - private IteratorUtils() {} + private IteratorUtils() {} // Empty //----------------------------------------------------------------------- @@ -937,7 +937,7 @@ public class IteratorUtils { * @param the element type * @param a the first iterator to interleave * @param b the second iterator to interleave - * @param c the third iterator to interleave + * @param c the third iterator to interleave * @return an iterator, interleaving the decorated iterators * @throws IllegalArgumentException if any iterator is null * @since 4.1 @@ -1250,7 +1250,7 @@ public class IteratorUtils { * A null or empty iterator returns false. * * @param the type of object the {@link Iterator} contains - * @param input the {@link Iterator} to use, may be null + * @param iterator the {@link Iterator} to use, may be null * @param predicate the predicate to use, may not be null * @return true if any element of the collection matches the predicate, false otherwise * @throws NullPointerException if predicate is null @@ -1278,7 +1278,7 @@ public class IteratorUtils { * A null or empty iterator returns true. * * @param the type of object the {@link Iterator} contains - * @param input the {@link Iterator} to use, may be null + * @param iterator the {@link Iterator} to use, may be null * @param predicate the predicate to use, may not be null * @return true if every element of the collection matches the predicate or if the * collection is empty, false otherwise @@ -1386,7 +1386,7 @@ public class IteratorUtils { * converted to strings as by {@code String.valueOf(Object)}. * * @param the element type - * @param iterable the iterator to convert to a string + * @param iterator the iterator to convert to a string * @return a string representation of {@code iterator} * @since 4.1 */ @@ -1405,7 +1405,7 @@ public class IteratorUtils { * converted to strings as by using the provided {@code transformer}. * * @param the element type - * @param iterable the iterator to convert to a string, may be null + * @param iterator the iterator to convert to a string, may be null * @param transformer the transformer used to get a string representation of an element * @return a string representation of {@code iterator} * @throws NullPointerException if {@code transformer} is null diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java index aba12fe2f..8357607b5 100644 --- a/src/main/java/org/apache/commons/collections4/SetUtils.java +++ b/src/main/java/org/apache/commons/collections4/SetUtils.java @@ -167,6 +167,7 @@ public class SetUtils { * using {@link java.util.Collections#synchronizedSet(Set)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. * + * @param the element type * @return a new identity hash set * @since 4.1 */