the element type
* @param iterators the iterators to use, not null or empty or contain nulls
* @return a combination iterator over the iterators
* @throws NullPointerException if iterators collection is null or contains a null
@@ -497,6 +523,7 @@ public class IteratorUtils {
*
* The comparator is optional. If null is specified then natural order is used.
*
+ * @param the element type
* @param comparator the comparator to use, may be null for natural order
* @param iterator1 the first iterators to use, not null
* @param iterator2 the first iterators to use, not null
@@ -519,10 +546,11 @@ public class IteratorUtils {
*
* The comparator is optional. If null is specified then natural order is used.
*
+ * @param the element type
* @param comparator the comparator to use, may be null for natural order
* @param iterators the iterators to use, not null or empty or contain nulls
* @return a combination iterator over the iterators
- * @throws NullPointerException if iterators array is null or contains a null
+ * @throws NullPointerException if iterators array is null or contains a null value
*/
public static Iterator collatedIterator(final Comparator super E> comparator,
final Iterator extends E>[] iterators) {
@@ -539,6 +567,7 @@ public class IteratorUtils {
*
* The comparator is optional. If null is specified then natural order is used.
*
+ * @param the element type
* @param comparator the comparator to use, may be null for natural order
* @param iterators the iterators to use, not null or empty or contain nulls
* @return a combination iterator over the iterators
@@ -600,6 +629,7 @@ public class IteratorUtils {
* Under many circumstances, linking Iterators together in this manner is
* more efficient (and convenient) than using nested for loops to extract a list.
*
+ * @param the element type
* @param root the root object to start iterating from, null results in an empty iterator
* @param transformer the transformer to use, see above, null uses no effect transformer
* @return a new object graph iterator
@@ -618,6 +648,8 @@ public class IteratorUtils {
* The transformation occurs during the next() method and the underlying
* iterator is unaffected by the transformation.
*
+ * @param the input type
+ * @param the output type
* @param iterator the iterator to use, not null
* @param transform the transform to use, not null
* @return a new transforming iterator
@@ -643,6 +675,7 @@ public class IteratorUtils {
* The returned iterator will only return objects that match the specified
* filtering predicate.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @param predicate the predicate to use as a filter, not null
* @return a new filtered iterator
@@ -665,6 +698,7 @@ public class IteratorUtils {
* The returned iterator will only return objects that match the specified
* filtering predicate.
*
+ * @param the element type
* @param listIterator the list iterator to use, not null
* @param predicate the predicate to use as a filter, not null
* @return a new filtered iterator
@@ -691,6 +725,7 @@ public class IteratorUtils {
* enough times to empty the collection, or if the collection is empty
* to start with.
*
+ * @param the element type
* @param coll the collection to iterate over, not null
* @return a new looping iterator
* @throws NullPointerException if the collection is null
@@ -708,6 +743,7 @@ public class IteratorUtils {
* The iterator will only stop looping if the remove method is called
* enough times to empty the list, or if the list is empty to start with.
*
+ * @param the element type
* @param list the list to iterate over, not null
* @return a new looping iterator
* @throws NullPointerException if the list is null
@@ -725,6 +761,7 @@ public class IteratorUtils {
/**
* Gets an iterator that provides an iterator view of the given enumeration.
*
+ * @param the element type
* @param enumeration the enumeration to use
* @return a new iterator
*/
@@ -739,6 +776,7 @@ public class IteratorUtils {
* Gets an iterator that provides an iterator view of the given enumeration
* that will remove elements from the specified collection.
*
+ * @param the element type
* @param enumeration the enumeration to use
* @param removeCollection the collection to remove elements from
* @return a new iterator
@@ -757,6 +795,7 @@ public class IteratorUtils {
/**
* Gets an enumeration that wraps an iterator.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @return a new enumeration
* @throws NullPointerException if iterator is null
@@ -769,11 +808,12 @@ public class IteratorUtils {
}
/**
- * Gets an iterable that wraps an iterator. The returned iterable can be
+ * Gets an {@link Iterable} that wraps an iterator. The returned {@link Iterable} can be
* used for a single iteration.
*
+ * @param the element type
* @param iterator the iterator to use, not null
- * @return a new, single use iterable
+ * @return a new, single use {@link Iterable}
* @throws NullPointerException if iterator is null
*/
public static Iterable asIterable(final Iterator extends E> iterator) {
@@ -787,6 +827,7 @@ public class IteratorUtils {
* Gets an iterable that wraps an iterator. The returned iterable can be
* used for multiple iterations.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @return a new, multiple use iterable
* @throws NullPointerException if iterator is null
@@ -804,6 +845,7 @@ public class IteratorUtils {
* As the wrapped Iterator is traversed, a LinkedList of its values is
* cached, permitting all required operations of ListIterator.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @return a new iterator
* @throws NullPointerException if iterator parameter is null
@@ -839,11 +881,11 @@ public class IteratorUtils {
* As the wrapped Iterator is traversed, an ArrayList of its values is
* created. At the end, this is converted to an array.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @param arrayClass the class of array to create
* @return an array of the iterator contents
- * @throws NullPointerException if iterator parameter is null
- * @throws NullPointerException if arrayClass is null
+ * @throws NullPointerException if iterator parameter or arrayClass is null
* @throws ClassCastException if the arrayClass is invalid
*/
public static E[] toArray(final Iterator extends E> iterator, final Class arrayClass) {
@@ -865,6 +907,7 @@ public class IteratorUtils {
* As the wrapped Iterator is traversed, an ArrayList of its values is
* created. At the end, the list is returned.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @return a list of the iterator contents
* @throws NullPointerException if iterator parameter is null
@@ -879,6 +922,7 @@ public class IteratorUtils {
* As the wrapped Iterator is traversed, an ArrayList of its values is
* created. At the end, the list is returned.
*
+ * @param the element type
* @param iterator the iterator to use, not null
* @param estimatedSize the initial size of the ArrayList
* @return a list of the iterator contents