diff --git a/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyIterator.java b/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyIterator.java index 017464d12..b6ee3916e 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyIterator.java @@ -18,14 +18,14 @@ package org.apache.commons.collections4.iterators; import java.util.NoSuchElementException; -/** +/** * Provides an implementation of an empty iterator. * * @since 3.1 * @version $Id$ */ abstract class AbstractEmptyIterator { - + /** * Constructor. */ diff --git a/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyMapIterator.java index 5672cff12..fd697ea2a 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyMapIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/AbstractEmptyMapIterator.java @@ -16,7 +16,7 @@ */ package org.apache.commons.collections4.iterators; -/** +/** * Provides an implementation of an empty map iterator. * * @since 4.0 diff --git a/src/main/java/org/apache/commons/collections4/iterators/AbstractListIteratorDecorator.java b/src/main/java/org/apache/commons/collections4/iterators/AbstractListIteratorDecorator.java index 216492328..eb33a2270 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/AbstractListIteratorDecorator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/AbstractListIteratorDecorator.java @@ -48,7 +48,7 @@ public class AbstractListIteratorDecorator implements ListIterator { /** * Gets the iterator being decorated. - * + * * @return the decorated iterator */ protected ListIterator getListIterator() { @@ -56,7 +56,7 @@ public class AbstractListIteratorDecorator implements ListIterator { } //----------------------------------------------------------------------- - + /** {@inheritDoc} */ public boolean hasNext() { return iterator.hasNext(); @@ -101,5 +101,5 @@ public class AbstractListIteratorDecorator implements ListIterator { public void add(final E obj) { iterator.add(obj); } - + } diff --git a/src/main/java/org/apache/commons/collections4/iterators/AbstractMapIteratorDecorator.java b/src/main/java/org/apache/commons/collections4/iterators/AbstractMapIteratorDecorator.java index ba83e4ec9..87d0c04f3 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/AbstractMapIteratorDecorator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/AbstractMapIteratorDecorator.java @@ -48,7 +48,7 @@ public class AbstractMapIteratorDecorator implements MapIterator { /** * Gets the iterator being decorated. - * + * * @return the decorated iterator */ protected MapIterator getMapIterator() { @@ -56,7 +56,7 @@ public class AbstractMapIteratorDecorator implements MapIterator { } //----------------------------------------------------------------------- - + /** {@inheritDoc} */ public boolean hasNext() { return iterator.hasNext(); diff --git a/src/main/java/org/apache/commons/collections4/iterators/AbstractOrderedMapIteratorDecorator.java b/src/main/java/org/apache/commons/collections4/iterators/AbstractOrderedMapIteratorDecorator.java index 681ecef88..71e35024e 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/AbstractOrderedMapIteratorDecorator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/AbstractOrderedMapIteratorDecorator.java @@ -48,7 +48,7 @@ public class AbstractOrderedMapIteratorDecorator implements OrderedMapIter /** * Gets the iterator being decorated. - * + * * @return the decorated iterator */ protected OrderedMapIterator getOrderedMapIterator() { @@ -56,7 +56,7 @@ public class AbstractOrderedMapIteratorDecorator implements OrderedMapIter } //----------------------------------------------------------------------- - + /** {@inheritDoc} */ public boolean hasNext() { return iterator.hasNext(); @@ -81,7 +81,7 @@ public class AbstractOrderedMapIteratorDecorator implements OrderedMapIter public void remove() { iterator.remove(); } - + /** {@inheritDoc} */ public K getKey() { return iterator.getKey(); diff --git a/src/main/java/org/apache/commons/collections4/iterators/AbstractUntypedIteratorDecorator.java b/src/main/java/org/apache/commons/collections4/iterators/AbstractUntypedIteratorDecorator.java index 017cd20e5..3ea74ee0a 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/AbstractUntypedIteratorDecorator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/AbstractUntypedIteratorDecorator.java @@ -34,7 +34,7 @@ public abstract class AbstractUntypedIteratorDecorator implements Iterator /** * Create a new AbstractUntypedIteratorDecorator. - * + * * @param iterator the iterator to decorate */ protected AbstractUntypedIteratorDecorator(final Iterator iterator) { @@ -47,7 +47,7 @@ public abstract class AbstractUntypedIteratorDecorator implements Iterator /** * Gets the iterator being decorated. - * + * * @return the decorated iterator */ protected Iterator getIterator() { diff --git a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java index 21aa529b7..6e72e9db8 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java @@ -21,15 +21,15 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.ResettableIterator; -/** +/** * Implements an {@link java.util.Iterator Iterator} over any array. *

- * The array can be either an array of object or of primitives. If you know - * that you have an object array, the + * The array can be either an array of object or of primitives. If you know + * that you have an object array, the * {@link org.apache.commons.collections4.iterators.ObjectArrayIterator ObjectArrayIterator} * class is a better choice, as it will perform better. *

- * The iterator implements a {@link #reset} method, allowing the reset of + * The iterator implements a {@link #reset} method, allowing the reset of * the iterator back to the start if required. * * @since 1.0 @@ -39,7 +39,7 @@ public class ArrayIterator implements ResettableIterator { // TODO Privatise fields? Mainly read-only access - /** The array to iterate over */ + /** The array to iterate over */ protected Object array; /** The start index to loop from */ protected int startIndex = 0; @@ -47,7 +47,7 @@ public class ArrayIterator implements ResettableIterator { protected int endIndex = 0; /** The current iterator index */ protected int index = 0; - + // Constructors // ---------------------------------------------------------------------- /** @@ -59,7 +59,7 @@ public class ArrayIterator implements ResettableIterator { public ArrayIterator() { super(); } - + /** * Constructs an ArrayIterator that will iterate over the values in the * specified array. @@ -92,7 +92,7 @@ public class ArrayIterator implements ResettableIterator { } /** - * Construct an ArrayIterator that will iterate over a range of values + * Construct an ArrayIterator that will iterate over a range of values * in the specified array. * * @param array the array to iterate over. @@ -117,7 +117,7 @@ public class ArrayIterator implements ResettableIterator { /** * Checks whether the index is valid or not. - * + * * @param bound the index to check * @param type the index type (for error messages) * @throws IndexOutOfBoundsException if the index is invalid @@ -175,7 +175,7 @@ public class ArrayIterator implements ResettableIterator { // Properties //----------------------------------------------------------------------- /** - * Gets the array that this iterator is iterating over. + * Gets the array that this iterator is iterating over. * * @return the array this iterator iterates over, or null if * the no-arg constructor was used and {@link #setArray(Object)} has never @@ -184,7 +184,7 @@ public class ArrayIterator implements ResettableIterator { public Object getArray() { return array; } - + /** * Sets the array that the ArrayIterator should iterate over. *

@@ -209,7 +209,7 @@ public class ArrayIterator implements ResettableIterator { this.array = array; this.index = 0; } - + /** * Resets the iterator back to the start index. */ diff --git a/src/main/java/org/apache/commons/collections4/iterators/ArrayListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ArrayListIterator.java index 01546235c..3505b1941 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ArrayListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ArrayListIterator.java @@ -23,14 +23,14 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.ResettableListIterator; /** - * Implements a {@link ListIterator} over an array. + * Implements a {@link ListIterator} over an array. *

- * The array can be either an array of object or of primitives. If you know + * The array can be either an array of object or of primitives. If you know * that you have an object array, the {@link ObjectArrayListIterator} * class is a better choice, as it will perform better. * *

- * This iterator does not support {@link #add(Object)} or {@link #remove()}, as the array + * This iterator does not support {@link #add(Object)} or {@link #remove()}, as the array * cannot be changed in size. The {@link #set(Object)} method is supported however. * * @see org.apache.commons.collections4.iterators.ArrayIterator @@ -46,7 +46,7 @@ public class ArrayListIterator extends ArrayIterator /** * Holds the index of the last item returned by a call to next() * or previous(). This is set to -1 if neither method - * has yet been invoked. lastItemIndex is used to to implement + * has yet been invoked. lastItemIndex is used to to implement * the {@link #set} method. * */ @@ -92,7 +92,7 @@ public class ArrayListIterator extends ArrayIterator } /** - * Construct an ArrayListIterator that will iterate over a range of values + * Construct an ArrayListIterator that will iterate over a range of values * in the specified array. * * @param array the array to iterate over @@ -121,7 +121,7 @@ public class ArrayListIterator extends ArrayIterator /** * Gets the previous element from the array. - * + * * @return the previous element * @throws NoSuchElementException if there is no previous element */ @@ -136,7 +136,7 @@ public class ArrayListIterator extends ArrayIterator /** * Gets the next element from the array. - * + * * @return the next element * @throws NoSuchElementException if there is no next element */ @@ -152,7 +152,7 @@ public class ArrayListIterator extends ArrayIterator /** * Gets the next index to be retrieved. - * + * * @return the index of the item to be retrieved next */ public int nextIndex() { @@ -161,7 +161,7 @@ public class ArrayListIterator extends ArrayIterator /** * Gets the index of the item to be retrieved if {@link #previous()} is called. - * + * * @return the index of the item to be retrieved next */ public int previousIndex() { @@ -183,8 +183,8 @@ public class ArrayListIterator extends ArrayIterator /** * Sets the element under the cursor. *

- * This method sets the element that was returned by the last call - * to {@link #next()} of {@link #previous()}. + * This method sets the element that was returned by the last call + * to {@link #next()} of {@link #previous()}. *

* Note: {@link ListIterator} implementations that support * add() and remove() only allow set() to be called diff --git a/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java index bf372ad97..6805f6575 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java @@ -75,7 +75,7 @@ public class CollatingIterator implements Iterator { * Constructs a new CollatingIterator that will used the * specified comparator for ordering. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. - * + * * @param comp the comparator to use to sort; must not be null, * unless you'll be invoking {@link #setComparator(Comparator)} * later on. @@ -89,7 +89,7 @@ public class CollatingIterator implements Iterator { * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be manually added using the * {@link #addIterator(Iterator)} method. - * + * * @param comp the comparator to use to sort; must not be null, * unless you'll be invoking {@link #setComparator(Comparator)} * later on. @@ -105,7 +105,7 @@ public class CollatingIterator implements Iterator { * Constructs a new CollatingIterator that will use the * specified comparator to provide ordered iteration over the two given * iterators. - * + * * @param comp the comparator to use to sort; must not be null, * unless you'll be invoking {@link #setComparator(Comparator)} * later on. @@ -124,7 +124,7 @@ public class CollatingIterator implements Iterator { * Constructs a new CollatingIterator that will use the * specified comparator to provide ordered iteration over the array of * iterators. - * + * * @param comp the comparator to use to sort; must not be null, * unless you'll be invoking {@link #setComparator(Comparator)} * later on. @@ -142,7 +142,7 @@ public class CollatingIterator implements Iterator { * Constructs a new CollatingIterator that will use the * specified comparator to provide ordered iteration over the collection of * iterators. - * + * * @param comp the comparator to use to sort; must not be null, * unless you'll be invoking {@link #setComparator(Comparator)} * later on. @@ -163,7 +163,7 @@ public class CollatingIterator implements Iterator { // ---------------------------------------------------------------------- /** * Adds the given {@link Iterator} to the iterators being collated. - * + * * @param iterator the iterator to add to the collation, must not be null * @throws IllegalStateException if iteration has started * @throws NullPointerException if the iterator is null @@ -178,7 +178,7 @@ public class CollatingIterator implements Iterator { /** * Sets the iterator at the given index. - * + * * @param index index of the Iterator to replace * @param iterator Iterator to place at the given index * @throws IndexOutOfBoundsException if index < 0 or index > size() @@ -195,7 +195,7 @@ public class CollatingIterator implements Iterator { /** * Gets the list of Iterators (unmodifiable). - * + * * @return the unmodifiable list of iterators added */ public List> getIterators() { @@ -204,7 +204,7 @@ public class CollatingIterator implements Iterator { /** * Gets the {@link Comparator} by which collatation occurs. - * + * * @return the {@link Comparator} */ public Comparator getComparator() { @@ -217,7 +217,7 @@ public class CollatingIterator implements Iterator { * if the elements in the iterators are implementing the * {@link java.lang.Comparable} interface), then use the * {@link org.apache.commons.collections4.comparators.ComparableComparator}. - * + * * @param comp the {@link Comparator} to set * @throws IllegalStateException if iteration has started */ @@ -230,7 +230,7 @@ public class CollatingIterator implements Iterator { // ------------------------------------------------------------------- /** * Returns true if any child iterator has remaining elements. - * + * * @return true if this iterator has remaining elements */ public boolean hasNext() { @@ -240,7 +240,7 @@ public class CollatingIterator implements Iterator { /** * Returns the next ordered element from a child iterator. - * + * * @return the next ordered element * @throws NoSuchElementException if no child iterator has any more elements */ @@ -261,7 +261,7 @@ public class CollatingIterator implements Iterator { /** * Removes the last returned element from the child iterator that produced * it. - * + * * @throws IllegalStateException if there is no last returned element, or if * the last returned element has already been removed */ @@ -274,7 +274,7 @@ public class CollatingIterator implements Iterator { /** * Returns the index of the iterator that returned the last element. - * + * * @return the index of the iterator that returned the last element * @throws IllegalStateException if there is no last returned element */ @@ -282,10 +282,10 @@ public class CollatingIterator implements Iterator { if (lastReturned == -1) { throw new IllegalStateException("No value has been returned yet"); } - + return lastReturned; } - + // Private Methods // ------------------------------------------------------------------- /** @@ -307,7 +307,7 @@ public class CollatingIterator implements Iterator { * i to the next value of the {@link #iterators iterator} at position * i, or clear them if the ith iterator has no next * value. - * + * * @return false iff there was no value to set */ private boolean set(final int i) { @@ -334,7 +334,7 @@ public class CollatingIterator implements Iterator { /** * Throws {@link IllegalStateException} if iteration has started via * {@link #start}. - * + * * @throws IllegalStateException if iteration started */ private void checkNotStarted() throws IllegalStateException { @@ -346,7 +346,7 @@ public class CollatingIterator implements Iterator { /** * Returns the index of the least element in {@link #values}, * {@link #set(int) setting} any uninitialized values. - * + * * @throws NullPointerException if no comparator is set */ private int least() { diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java index e4ce7e290..7540d127b 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java @@ -20,7 +20,7 @@ import java.util.Iterator; import org.apache.commons.collections4.ResettableIterator; -/** +/** * Provides an implementation of an empty iterator. *

* This class provides an implementation of an empty iterator. 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 68f93bc32..8ea1aad4e 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java @@ -19,7 +19,7 @@ package org.apache.commons.collections4.iterators; import org.apache.commons.collections4.MapIterator; import org.apache.commons.collections4.ResettableIterator; -/** +/** * Provides an implementation of an empty map iterator. * * @since 3.1 diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java index efd52dd66..5d1fa96f2 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java @@ -19,7 +19,7 @@ package org.apache.commons.collections4.iterators; import org.apache.commons.collections4.OrderedIterator; import org.apache.commons.collections4.ResettableIterator; -/** +/** * Provides an implementation of an empty ordered iterator. * * @since 3.1 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 8e4532d9c..395a7edbf 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java @@ -19,7 +19,7 @@ package org.apache.commons.collections4.iterators; import org.apache.commons.collections4.OrderedMapIterator; import org.apache.commons.collections4.ResettableIterator; -/** +/** * Provides an implementation of an empty ordered map iterator. * * @since 3.1 diff --git a/src/main/java/org/apache/commons/collections4/iterators/EntrySetMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EntrySetMapIterator.java index b7f8c4999..fc3841b51 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/EntrySetMapIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/EntrySetMapIterator.java @@ -33,20 +33,20 @@ import org.apache.commons.collections4.ResettableIterator; * it.setValue(newValue); * } * - * + * * @since 3.0 * @version $Id$ */ public class EntrySetMapIterator implements MapIterator, ResettableIterator { - + private final Map map; private Iterator> iterator; private Map.Entry last; private boolean canRemove = false; - + /** * Constructor. - * + * * @param map the map to iterate over */ public EntrySetMapIterator(final Map map) { @@ -55,7 +55,7 @@ public class EntrySetMapIterator implements MapIterator, ResettableI this.iterator = map.entrySet().iterator(); } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- /** * Checks to see if there are more entries still to be iterated. * @@ -96,7 +96,7 @@ public class EntrySetMapIterator implements MapIterator, ResettableI last = null; canRemove = false; } - + //----------------------------------------------------------------------- /** * Gets the current key, which is the key returned by the last call @@ -152,12 +152,12 @@ public class EntrySetMapIterator implements MapIterator, ResettableI last = null; canRemove = false; } - + /** * Gets the iterator as a String. - * + * * @return a string version of the iterator - */ + */ @Override public String toString() { if (last != null) { @@ -165,5 +165,5 @@ public class EntrySetMapIterator implements MapIterator, ResettableI } return "MapIterator[]"; } - + } 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 800f42583..00d20c0a4 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/EnumerationIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/EnumerationIterator.java @@ -20,7 +20,7 @@ import java.util.Collection; import java.util.Enumeration; import java.util.Iterator; -/** +/** * Adapter to make {@link Enumeration Enumeration} instances appear * to be {@link Iterator Iterator} instances. * @@ -28,14 +28,14 @@ import java.util.Iterator; * @version $Id$ */ public class EnumerationIterator implements Iterator { - + /** The collection to remove elements from */ private final Collection collection; /** The enumeration being converted */ private Enumeration enumeration; /** The last object retrieved */ private E last; - + // Constructors //----------------------------------------------------------------------- /** @@ -134,5 +134,5 @@ public class EnumerationIterator implements Iterator { public void setEnumeration(final Enumeration enumeration) { this.enumeration = enumeration; } - + } diff --git a/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java b/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java index 146b08a0e..53aa08abc 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java @@ -21,7 +21,7 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.Predicate; -/** +/** * Decorates another {@link Iterator} using a predicate to filter elements. *

* This iterator decorates the underlying iterator, only allowing through @@ -75,8 +75,8 @@ public class FilterIterator implements Iterator { } //----------------------------------------------------------------------- - /** - * Returns true if the underlying iterator contains an object that + /** + * Returns true if the underlying iterator contains an object that * matches the predicate. * * @return true if there is another object that matches the predicate @@ -86,13 +86,13 @@ public class FilterIterator implements Iterator { return nextObjectSet || setNextObject(); } - /** + /** * Returns the next object that matches the predicate. * * @return the next object which matches the given predicate * @throws NullPointerException if either the iterator or predicate are null * @throws NoSuchElementException if there are no more elements that - * match the predicate + * match the predicate */ public E next() { if (!nextObjectSet) { @@ -123,7 +123,7 @@ public class FilterIterator implements Iterator { } //----------------------------------------------------------------------- - /** + /** * Gets the iterator this iterator is using. * * @return the iterator @@ -132,7 +132,7 @@ public class FilterIterator implements Iterator { return iterator; } - /** + /** * Sets the iterator for this iterator to use. * If iteration has started, this effectively resets the iterator. * @@ -145,7 +145,7 @@ public class FilterIterator implements Iterator { } //----------------------------------------------------------------------- - /** + /** * Gets the predicate this iterator is using. * * @return the predicate @@ -154,7 +154,7 @@ public class FilterIterator implements Iterator { return predicate; } - /** + /** * Sets the predicate this the iterator to use. * * @param predicate the predicate to use @@ -167,7 +167,7 @@ public class FilterIterator implements Iterator { //----------------------------------------------------------------------- /** - * Set nextObject to the next object. If there are no more + * Set nextObject to the next object. If there are no more * objects then return false. Otherwise, return true. */ private boolean setNextObject() { 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 685cb08f6..7e5855f99 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java @@ -21,7 +21,7 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.Predicate; -/** +/** * Decorates another {@link ListIterator} using a predicate to filter elements. *

* This iterator decorates the underlying iterator, only allowing through @@ -34,39 +34,39 @@ public class FilterListIterator implements ListIterator { /** The iterator being used */ private ListIterator iterator; - + /** The predicate being used */ private Predicate predicate; - /** - * The value of the next (matching) object, when - * {@link #nextObjectSet} is true. + /** + * The value of the next (matching) object, when + * {@link #nextObjectSet} is true. */ private E nextObject; - /** + /** * Whether or not the {@link #nextObject} has been set - * (possibly to null). + * (possibly to null). */ - private boolean nextObjectSet = false; + private boolean nextObjectSet = false; - /** - * The value of the previous (matching) object, when - * {@link #previousObjectSet} is true. + /** + * The value of the previous (matching) object, when + * {@link #previousObjectSet} is true. */ private E previousObject; - /** + /** * Whether or not the {@link #previousObject} has been set - * (possibly to null). + * (possibly to null). */ - private boolean previousObjectSet = false; + private boolean previousObjectSet = false; - /** + /** * The index of the element that would be returned by {@link #next}. */ private int nextIndex = 0; - + //----------------------------------------------------------------------- /** * Constructs a new FilterListIterator that will not function @@ -78,7 +78,7 @@ public class FilterListIterator implements ListIterator { } /** - * Constructs a new FilterListIterator that will not + * Constructs a new FilterListIterator that will not * function until {@link #setPredicate(Predicate) setPredicate} is invoked. * * @param iterator the iterator to use @@ -168,19 +168,19 @@ public class FilterListIterator implements ListIterator { } //----------------------------------------------------------------------- - /** + /** * Gets the iterator this iterator is using. - * + * * @return the iterator. */ public ListIterator getListIterator() { return iterator; } - /** + /** * Sets the iterator for this iterator to use. * If iteration has started, this effectively resets the iterator. - * + * * @param iterator the iterator to use */ public void setListIterator(final ListIterator iterator) { @@ -188,18 +188,18 @@ public class FilterListIterator implements ListIterator { } //----------------------------------------------------------------------- - /** + /** * Gets the predicate this iterator is using. - * + * * @return the predicate. */ public Predicate getPredicate() { return predicate; } - /** + /** * Sets the predicate this the iterator to use. - * + * * @param predicate the transformer to use */ public void setPredicate(final Predicate predicate) { @@ -214,7 +214,7 @@ public class FilterListIterator implements ListIterator { private boolean setNextObject() { // if previousObjectSet, - // then we've walked back one step in the + // then we've walked back one step in the // underlying list (due to a hasPrevious() call) // so skip ahead one matching object if (previousObjectSet) { @@ -246,7 +246,7 @@ public class FilterListIterator implements ListIterator { private boolean setPreviousObject() { // if nextObjectSet, - // then we've walked back one step in the + // then we've walked back one step in the // underlying list (due to a hasNext() call) // so skip ahead one matching object if (nextObjectSet) { 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 e9976b056..676184522 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java +++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java @@ -88,7 +88,7 @@ public class IteratorChain implements Iterator { *

* You will normally use {@link #addIterator(Iterator)} to add some more * iterators after using this constructor. - * + * * @param iterator the first child iterator in the IteratorChain, not null * @throws NullPointerException if the iterator is null */ @@ -102,7 +102,7 @@ public class IteratorChain implements Iterator { *

* This method takes two iterators. The newly constructed iterator will * iterate through each one of the input iterators in turn. - * + * * @param first the first child iterator in the IteratorChain, not null * @param second the second child iterator in the IteratorChain, not null * @throws NullPointerException if either iterator is null @@ -118,7 +118,7 @@ public class IteratorChain implements Iterator { *

* This method takes an array of iterators. The newly constructed iterator * will iterate through each one of the input iterators in turn. - * + * * @param iteratorChain the array of iterators, not null * @throws NullPointerException if iterators array is or contains null */ @@ -135,7 +135,7 @@ public class IteratorChain implements Iterator { *

* This method takes a collection of iterators. The newly constructed * iterator will iterate through each one of the input iterators in turn. - * + * * @param iteratorChain the collection of iterators, not null * @throws NullPointerException if iterators collection is or contains null * @throws ClassCastException if iterators collection doesn't contain an @@ -151,7 +151,7 @@ public class IteratorChain implements Iterator { //----------------------------------------------------------------------- /** * Add an Iterator to the end of the chain - * + * * @param iterator Iterator to add * @throws IllegalStateException if I've already started iterating * @throws NullPointerException if the iterator is null @@ -166,7 +166,7 @@ public class IteratorChain implements Iterator { /** * Set the Iterator at the given index - * + * * @param index index of the Iterator to replace * @param iterator Iterator to place at the given index * @throws IndexOutOfBoundsException if index < 0 or index > size() @@ -184,7 +184,7 @@ public class IteratorChain implements Iterator { /** * Get the list of Iterators (unmodifiable) - * + * * @return the unmodifiable list of iterators added */ public List> getIterators() { @@ -193,7 +193,7 @@ public class IteratorChain implements Iterator { /** * Number of Iterators in the current IteratorChain. - * + * * @return Iterator count */ public int size() { @@ -204,7 +204,7 @@ public class IteratorChain implements Iterator { * Determine if modifications can still be made to the IteratorChain. * IteratorChains cannot be modified once they have executed a method from * the Iterator interface. - * + * * @return true if IteratorChain cannot be modified, false if it can */ public boolean isLocked() { @@ -257,7 +257,7 @@ public class IteratorChain implements Iterator { //----------------------------------------------------------------------- /** * Return true if any Iterator in the IteratorChain has a remaining element. - * + * * @return true if elements remain */ public boolean hasNext() { @@ -270,7 +270,7 @@ public class IteratorChain implements Iterator { /** * Returns the next Object of the current Iterator - * + * * @return Object from the current Iterator * @throws java.util.NoSuchElementException if all the Iterators are * exhausted @@ -289,7 +289,7 @@ public class IteratorChain implements Iterator { * underlying Iterator. Therefore, this method may throw an * UnsupportedOperationException if the underlying Iterator does not support * this method. - * + * * @throws UnsupportedOperationException if the remove operator is not * supported by the underlying Iterator * @throws IllegalStateException if the next method has not yet been called, diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorEnumeration.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorEnumeration.java index ed0c7822e..6a3ae4d9c 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/IteratorEnumeration.java +++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorEnumeration.java @@ -42,7 +42,7 @@ public class IteratorEnumeration implements Enumeration { /** * Constructs a new IteratorEnumeration that will use the given * iterator. - * + * * @param iterator the iterator to use */ public IteratorEnumeration(final Iterator iterator) { @@ -55,7 +55,7 @@ public class IteratorEnumeration implements Enumeration { /** * Returns true if the underlying iterator has more elements. - * + * * @return true if the underlying iterator has more elements */ public boolean hasMoreElements() { @@ -64,7 +64,7 @@ public class IteratorEnumeration implements Enumeration { /** * Returns the next element from the underlying iterator. - * + * * @return the next element from the underlying iterator. * @throws java.util.NoSuchElementException if the underlying iterator has * no more elements @@ -78,7 +78,7 @@ public class IteratorEnumeration implements Enumeration { /** * Returns the underlying iterator. - * + * * @return the underlying iterator */ public Iterator getIterator() { @@ -87,7 +87,7 @@ public class IteratorEnumeration implements Enumeration { /** * Sets the underlying iterator. - * + * * @param iterator the new underlying iterator */ public void setIterator(final Iterator iterator) { diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java index 3fafa8f1c..d680e68c6 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java +++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java @@ -21,7 +21,7 @@ import org.apache.commons.collections4.ResettableIterator; * Adapter to make an {@link Iterator Iterator} instance appear to be an * {@link Iterable Iterable} instance. The iterable can be constructed in one * of two variants: single use, multiple use. - * + * *

* In the single use iterable case, the iterable is only usable for one * iterative operation over the source iterator. Subsequent iterative @@ -33,7 +33,7 @@ import org.apache.commons.collections4.ResettableIterator; * Iterable iterable = new IteratorIterable(iterator); * *

- * + * *

* In the multiple use iterable case, the iterable is usable for any number of * iterative operations over the source iterator. Of special note, even though @@ -46,7 +46,7 @@ import org.apache.commons.collections4.ResettableIterator; * Iterable iterable = new IteratorIterable(iterator); * *

- * + * *

* A multiple use iterable can also be explicitly constructed using any * {@link Iterator} and specifying true for the @@ -56,7 +56,7 @@ import org.apache.commons.collections4.ResettableIterator; * Iterable iterable = new IteratorIterable(iterator, true); * *

- * + * * @since 4.0 * @version $Id$ */ @@ -85,14 +85,14 @@ public class IteratorIterable implements Iterable { /** the iterator being adapted into an iterable. */ private final Iterator iterator; - - /** the iterator parameterized as the {@link #iterator()} return type. */ + + /** the iterator parameterized as the {@link #iterator()} return type. */ private final Iterator typeSafeIterator; - + /** * Constructs a new IteratorIterable that will use the given * iterator. - * + * * @param iterator the iterator to use. */ public IteratorIterable(final Iterator iterator) { @@ -102,14 +102,14 @@ public class IteratorIterable implements Iterable { /** * Constructs a new IteratorIterable that will use the given * iterator. - * + * * @param iterator the iterator to use. * @param multipleUse true if the new iterable can be used in multiple iterations */ public IteratorIterable(final Iterator iterator, final boolean multipleUse) { super(); if (multipleUse && !(iterator instanceof ResettableIterator)) { - this.iterator = new ListIteratorWrapper(iterator); + this.iterator = new ListIteratorWrapper(iterator); } else { this.iterator = iterator; } @@ -118,7 +118,7 @@ public class IteratorIterable implements Iterable { /** * Gets the iterator wrapped by this iterable. - * + * * @return the iterator */ public Iterator iterator() { diff --git a/src/main/java/org/apache/commons/collections4/iterators/LazyIteratorChain.java b/src/main/java/org/apache/commons/collections4/iterators/LazyIteratorChain.java index 11c949859..062a0241c 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/LazyIteratorChain.java +++ b/src/main/java/org/apache/commons/collections4/iterators/LazyIteratorChain.java @@ -105,7 +105,7 @@ public abstract class LazyIteratorChain implements Iterator { /** * Return true if any Iterator in the chain has a remaining element. - * + * * @return true if elements remain */ public boolean hasNext() { @@ -117,14 +117,14 @@ public abstract class LazyIteratorChain implements Iterator { /** * Returns the next element of the current Iterator - * + * * @return element from the current Iterator * @throws java.util.NoSuchElementException if all the Iterators are exhausted */ public E next() { updateCurrentIterator(); lastUsedIterator = currentIterator; - + return currentIterator.next(); } @@ -134,7 +134,7 @@ public abstract class LazyIteratorChain implements Iterator { * As with next() and hasNext(), this method calls remove() on the underlying Iterator. * Therefore, this method may throw an UnsupportedOperationException if the underlying * Iterator does not support this method. - * + * * @throws UnsupportedOperationException if the remove operator is not * supported by the underlying Iterator * @throws IllegalStateException if the next method has not yet been called, diff --git a/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java b/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java index 536e7090d..7764f8385 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java @@ -28,7 +28,7 @@ import org.apache.commons.collections4.ResettableListIterator; /** * Converts an {@link Iterator} into a {@link ResettableListIterator}. * For plain Iterators this is accomplished by caching the returned - * elements. This class can also be used to simply add + * elements. This class can also be used to simply add * {@link org.apache.commons.collections4.ResettableIterator ResettableIterator} * functionality to a given {@link ListIterator}. *

diff --git a/src/main/java/org/apache/commons/collections4/iterators/LoopingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/LoopingIterator.java index eb722a34d..f0c9bc28a 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/LoopingIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/LoopingIterator.java @@ -25,18 +25,18 @@ import org.apache.commons.collections4.ResettableIterator; /** * An Iterator that restarts when it reaches the end. *

- * The iterator will loop continuously around the provided elements, unless + * The iterator will loop continuously around the provided elements, unless * there are no elements in the collection to begin with, or all the elements * have been {@link #remove removed}. *

* Concurrent modifications are not directly supported, and for most collection - * implementations will throw a ConcurrentModificationException. + * implementations will throw a ConcurrentModificationException. * * @since 3.0 * @version $Id$ */ public class LoopingIterator implements ResettableIterator { - + /** The collection to base the iterator on */ private final Collection collection; /** The current iterator */ @@ -47,7 +47,7 @@ public class LoopingIterator implements ResettableIterator { *

* There is no way to reset an Iterator instance without recreating it from * the original source, so the Collection must be passed in. - * + * * @param coll the collection to wrap * @throws NullPointerException if the collection is null */ @@ -59,12 +59,12 @@ public class LoopingIterator implements ResettableIterator { reset(); } - /** + /** * Has the iterator any more elements. *

* Returns false only if the collection originally had zero elements, or * all the elements have been {@link #remove removed}. - * + * * @return true if there are more elements */ public boolean hasNext() { @@ -75,7 +75,7 @@ public class LoopingIterator implements ResettableIterator { * Returns the next object in the collection. *

* If at the end of the collection, return the first element. - * + * * @return the next object * @throws NoSuchElementException if there are no elements * at all. Use {@link #hasNext} to avoid this error. @@ -93,8 +93,8 @@ public class LoopingIterator implements ResettableIterator { /** * Removes the previously retrieved item from the underlying collection. *

- * This feature is only supported if the underlying collection's - * {@link Collection#iterator iterator} method returns an implementation + * This feature is only supported if the underlying collection's + * {@link Collection#iterator iterator} method returns an implementation * that supports it. *

* This method can only be called after at least one {@link #next} method call. @@ -115,7 +115,7 @@ public class LoopingIterator implements ResettableIterator { /** * Gets the size of the collection underlying the iterator. - * + * * @return the current collection size */ public int size() { diff --git a/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java index b90811b2f..d796aed4a 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java @@ -38,7 +38,7 @@ public class NodeListIterator implements Iterator { private int index = 0; /** - * Convenience constructor, which creates a new NodeListIterator from + * Convenience constructor, which creates a new NodeListIterator from * the specified node's childNodes. * * @param node Node, who's child nodes are wrapped by this class. Must not be null @@ -64,7 +64,7 @@ public class NodeListIterator implements Iterator { } this.nodeList = nodeList; } - + public boolean hasNext() { return nodeList == null ? false : index < nodeList.getLength(); } diff --git a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java index a1853a3d5..e0fd08a19 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java @@ -21,7 +21,7 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.ResettableIterator; -/** +/** * An {@link Iterator} over an array of objects. *

* This iterator does not support {@link #remove}, as the object array cannot be @@ -82,7 +82,7 @@ public class ObjectArrayIterator } /** - * Construct an ObjectArrayIterator that will iterate over a range of values + * Construct an ObjectArrayIterator that will iterate over a range of values * in the specified array. * * @param array the array to iterate over @@ -151,7 +151,7 @@ public class ObjectArrayIterator //------------------------------------------------------------------------- /** - * Gets the array that this iterator is iterating over. + * Gets the array that this iterator is iterating over. * * @return the array this iterator iterates over, or null if * the no-arg constructor was used and {@link #setArray} has never @@ -185,7 +185,7 @@ public class ObjectArrayIterator /** * Gets the start index to loop from. - * + * * @return the start index */ public int getStartIndex() { @@ -194,7 +194,7 @@ public class ObjectArrayIterator /** * Gets the end index to loop to. - * + * * @return the end index */ public int getEndIndex() { diff --git a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java index 41747e32e..2028835e4 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java @@ -24,7 +24,7 @@ import org.apache.commons.collections4.ResettableListIterator; /** * Implements a {@link ListIterator} over an array of objects. *

- * This iterator does not support {@link #add} or {@link #remove}, as the object array + * This iterator does not support {@link #add} or {@link #remove}, as the object array * cannot be structurally modified. The {@link #set} method is supported however. *

* The iterator implements a {@link #reset} method, allowing the reset of the iterator @@ -41,7 +41,7 @@ public class ObjectArrayListIterator extends ObjectArrayIterator implements ListIterator, ResettableListIterator { /** - * Holds the index of the last item returned by a call to next() + * Holds the index of the last item returned by a call to next() * or previous(). This is set to -1 if neither method * has yet been invoked. lastItemIndex is used to to implement the * {@link #set} method. @@ -81,9 +81,9 @@ public class ObjectArrayListIterator extends ObjectArrayIterator public ObjectArrayListIterator(final E[] array, final int start) { super(array, start); } - + /** - * Construct an ObjectArrayListIterator that will iterate over a range of values + * Construct an ObjectArrayListIterator that will iterate over a range of values * in the specified array. * * @param array the array to iterate over @@ -111,7 +111,7 @@ public class ObjectArrayListIterator extends ObjectArrayIterator /** * Gets the previous element from the array. - * + * * @return the previous element * @throws NoSuchElementException if there is no previous element */ @@ -125,7 +125,7 @@ public class ObjectArrayListIterator extends ObjectArrayIterator /** * Gets the next element from the array. - * + * * @return the next element * @throws NoSuchElementException if there is no next element */ @@ -140,7 +140,7 @@ public class ObjectArrayListIterator extends ObjectArrayIterator /** * Gets the next index to be retrieved. - * + * * @return the index of the item to be retrieved next */ public int nextIndex() { @@ -149,7 +149,7 @@ public class ObjectArrayListIterator extends ObjectArrayIterator /** * Gets the index of the item to be retrieved if {@link #previous()} is called. - * + * * @return the index of the item to be retrieved next */ public int previousIndex() { @@ -170,16 +170,16 @@ public class ObjectArrayListIterator extends ObjectArrayIterator /** * Sets the element under the cursor. *

- * This method sets the element that was returned by the last call - * to {@link #next()} of {@link #previous()}. - * + * This method sets the element that was returned by the last call + * to {@link #next()} of {@link #previous()}. + * * Note: {@link ListIterator} implementations that support add() - * and remove() only allow set() to be called once per call + * and remove() only allow set() to be called once per call * to next() or previous (see the {@link ListIterator} - * javadoc for more details). Since this implementation does not support + * javadoc for more details). Since this implementation does not support * add() or remove(), set() may be * called as often as desired. - * + * * @param obj the object to set into the array * @throws IllegalStateException if next() has not yet been called. * @throws ClassCastException if the object type is unsuitable for the array diff --git a/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java index 8b94137ae..a0c3cdc52 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java @@ -98,7 +98,7 @@ public class ObjectGraphIterator implements Iterator { *

* The root object can be an iterator, in which case it will be immediately * looped around. - * + * * @param root the root object, null will result in an empty iterator * @param transformer the transformer to use, null will use a no effect transformer */ @@ -120,7 +120,7 @@ public class ObjectGraphIterator implements Iterator { * be used to iterate over nested iterators. That is to say that the iterator * passed in here contains other iterators, which may in turn contain further * iterators. - * + * * @param rootIterator the root iterator, null will result in an empty iterator */ public ObjectGraphIterator(final Iterator rootIterator) { @@ -155,7 +155,7 @@ public class ObjectGraphIterator implements Iterator { /** * Finds the next object in the iteration given any start object. - * + * * @param value the value to start from */ @SuppressWarnings("unchecked") @@ -169,10 +169,10 @@ public class ObjectGraphIterator implements Iterator { hasNext = true; } } - + /** * Finds the next object in the iteration given an iterator. - * + * * @param iterator the iterator to start from */ protected void findNextByIterator(final Iterator iterator) { @@ -183,7 +183,7 @@ public class ObjectGraphIterator implements Iterator { } currentIterator = iterator; } - + while (currentIterator.hasNext() && hasNext == false) { E next = currentIterator.next(); if (transformer != null) { @@ -202,7 +202,7 @@ public class ObjectGraphIterator implements Iterator { //----------------------------------------------------------------------- /** * Checks whether there are any more elements in the iteration to obtain. - * + * * @return true if elements remain in the iteration */ public boolean hasNext() { @@ -212,7 +212,7 @@ public class ObjectGraphIterator implements Iterator { /** * Gets the next element of the iteration. - * + * * @return the next element from the iteration * @throws NoSuchElementException if all the Iterators are exhausted */ @@ -233,8 +233,8 @@ public class ObjectGraphIterator implements Iterator { *

* This method calls remove() on the underlying Iterator and it may * throw an UnsupportedOperationException if the underlying Iterator - * does not support this method. - * + * does not support this method. + * * @throws UnsupportedOperationException * if the remove operator is not supported by the underlying Iterator * @throws IllegalStateException 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 c0a5d5663..6b8d71b5f 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java @@ -34,7 +34,7 @@ import java.util.NoSuchElementException; * {@code UnsupportedOperationException}. *

* NOTE: in case an empty collection is provided, the iterator will - * return exactly one empty list as result, as 0! = 1. + * return exactly one empty list as result, as 0! = 1. * * @param the type of the objects being permuted * diff --git a/src/main/java/org/apache/commons/collections4/iterators/SingletonIterator.java b/src/main/java/org/apache/commons/collections4/iterators/SingletonIterator.java index c6fc1518d..32b97f376 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/SingletonIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/SingletonIterator.java @@ -21,8 +21,8 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.ResettableIterator; -/** - * SingletonIterator is an {@link Iterator} over a single +/** + * SingletonIterator is an {@link Iterator} over a single * object instance. * * @since 2.0 @@ -69,7 +69,7 @@ public class SingletonIterator * Is another object available from the iterator? *

* This returns true if the single object hasn't been returned yet. - * + * * @return true if the single object hasn't been returned yet */ public boolean hasNext() { @@ -82,7 +82,7 @@ public class SingletonIterator * This returns the single object if it hasn't been returned yet. * * @return the single object - * @throws NoSuchElementException if the single object has already + * @throws NoSuchElementException if the single object has already * been returned */ public E next() { @@ -95,7 +95,7 @@ public class SingletonIterator /** * Remove the object from this iterator. - * + * * @throws IllegalStateException if the next method has not * yet been called, or the remove method has already * been called after the last call to the next @@ -114,12 +114,12 @@ public class SingletonIterator throw new UnsupportedOperationException(); } } - + /** * Reset the iterator to the start. */ public void reset() { beforeFirst = true; } - + } 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 9ba29878d..5896cc6aa 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java @@ -22,7 +22,7 @@ import java.util.NoSuchElementException; import org.apache.commons.collections4.ResettableListIterator; /** - * SingletonIterator is an {@link ListIterator} over a single + * SingletonIterator is an {@link ListIterator} over a single * object instance. * * @since 2.1 @@ -49,7 +49,7 @@ public class SingletonListIterator implements ListIterator, ResettableList * Is another object available from the iterator? *

* This returns true if the single object hasn't been returned yet. - * + * * @return true if the single object hasn't been returned yet */ public boolean hasNext() { @@ -60,7 +60,7 @@ public class SingletonListIterator implements ListIterator, ResettableList * Is a previous object available from the iterator? *

* This returns true if the single object has been returned. - * + * * @return true if the single object has been returned */ public boolean hasPrevious() { @@ -71,7 +71,7 @@ public class SingletonListIterator implements ListIterator, ResettableList * Returns the index of the element that would be returned by a subsequent * call to next. * - * @return 0 or 1 depending on current state. + * @return 0 or 1 depending on current state. */ public int nextIndex() { return beforeFirst ? 0 : 1; @@ -82,7 +82,7 @@ public class SingletonListIterator implements ListIterator, ResettableList * call to previous. A return value of -1 indicates that the iterator is currently at * the start. * - * @return 0 or -1 depending on current state. + * @return 0 or -1 depending on current state. */ public int previousIndex() { return beforeFirst ? -1 : 0; @@ -94,7 +94,7 @@ public class SingletonListIterator implements ListIterator, ResettableList * This returns the single object if it hasn't been returned yet. * * @return the single object - * @throws NoSuchElementException if the single object has already + * @throws NoSuchElementException if the single object has already * been returned */ public E next() { @@ -112,7 +112,7 @@ public class SingletonListIterator implements ListIterator, ResettableList * This returns the single object if it has been returned. * * @return the single object - * @throws NoSuchElementException if the single object has not already + * @throws NoSuchElementException if the single object has not already * been returned */ public E previous() { @@ -125,8 +125,8 @@ public class SingletonListIterator implements ListIterator, ResettableList /** * Remove the object from this iterator. - * @throws IllegalStateException if the next or previous - * method has not yet been called, or the remove method + * @throws IllegalStateException if the next or previous + * method has not yet been called, or the remove method * has already been called after the last call to next * or previous. */ @@ -138,7 +138,7 @@ public class SingletonListIterator implements ListIterator, ResettableList removed = true; } } - + /** * Add always throws {@link UnsupportedOperationException}. * @@ -148,12 +148,12 @@ public class SingletonListIterator implements ListIterator, ResettableList public void add(final E obj) { throw new UnsupportedOperationException("add() is not supported by this iterator"); } - + /** * Set sets the value of the singleton. * * @param obj the object to set - * @throws IllegalStateException if next has not been called + * @throws IllegalStateException if next has not been called * or the object has been removed */ public void set(final E obj) { @@ -162,7 +162,7 @@ public class SingletonListIterator implements ListIterator, ResettableList } this.object = obj; } - + /** * Reset the iterator back to the start. */ @@ -170,5 +170,5 @@ public class SingletonListIterator implements ListIterator, ResettableList beforeFirst = true; nextCalled = false; } - + } diff --git a/src/main/java/org/apache/commons/collections4/iterators/TransformIterator.java b/src/main/java/org/apache/commons/collections4/iterators/TransformIterator.java index 688b9681c..47e2ad396 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/TransformIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/TransformIterator.java @@ -20,7 +20,7 @@ import java.util.Iterator; import org.apache.commons.collections4.Transformer; -/** +/** * Decorates an iterator such that each element returned is transformed. * * @since 1.0 @@ -36,7 +36,7 @@ public class TransformIterator implements Iterator { //----------------------------------------------------------------------- /** * Constructs a new TransformIterator that will not function - * until the {@link #setIterator(Iterator) setIterator} and + * until the {@link #setIterator(Iterator) setIterator} and * {@link #setTransformer(Transformer)} methods are invoked. */ public TransformIterator() { @@ -78,7 +78,7 @@ public class TransformIterator implements Iterator { * Gets the next object from the iteration, transforming it using the * current transformer. If the transformer is null, no transformation * occurs and the object from the iterator is returned directly. - * + * * @return the next object * @throws java.util.NoSuchElementException if there are no more elements */ @@ -91,19 +91,19 @@ public class TransformIterator implements Iterator { } //----------------------------------------------------------------------- - /** + /** * Gets the iterator this iterator is using. - * + * * @return the iterator. */ public Iterator getIterator() { return iterator; } - /** + /** * Sets the iterator for this iterator to use. * If iteration has started, this effectively resets the iterator. - * + * * @param iterator the iterator to use */ public void setIterator(final Iterator iterator) { @@ -111,19 +111,19 @@ public class TransformIterator implements Iterator { } //----------------------------------------------------------------------- - /** + /** * Gets the transformer this iterator is using. - * + * * @return the transformer. */ public Transformer getTransformer() { return transformer; } - /** + /** * Sets the transformer this the iterator to use. * A null transformer is a no-op transformer. - * + * * @param transformer the transformer to use */ public void setTransformer(final Transformer transformer) { diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java index 2261eaf4f..e7037eee0 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java @@ -20,10 +20,10 @@ import java.util.Iterator; import org.apache.commons.collections4.Unmodifiable; -/** +/** * Decorates an iterator such that it cannot be modified. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java index 19ad6db1f..5b0741cea 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java @@ -20,10 +20,10 @@ import java.util.ListIterator; import org.apache.commons.collections4.Unmodifiable; -/** +/** * Decorates a list iterator such that it cannot be modified. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ @@ -51,7 +51,7 @@ public final class UnmodifiableListIterator implements ListIterator, Unmod } return new UnmodifiableListIterator(iterator); } - + //----------------------------------------------------------------------- /** * Constructor. diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java index 9ddde36cd..f783bc09c 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java @@ -19,10 +19,10 @@ package org.apache.commons.collections4.iterators; import org.apache.commons.collections4.MapIterator; import org.apache.commons.collections4.Unmodifiable; -/** +/** * Decorates a map iterator such that it cannot be modified. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java index 7e6679e82..d946ba49e 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java @@ -22,7 +22,7 @@ import org.apache.commons.collections4.Unmodifiable; /** * Decorates an ordered map iterator such that it cannot be modified. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ diff --git a/src/main/java/org/apache/commons/collections4/iterators/package-info.java b/src/main/java/org/apache/commons/collections4/iterators/package-info.java index 01584fc45..0438c0279 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/package-info.java +++ b/src/main/java/org/apache/commons/collections4/iterators/package-info.java @@ -18,7 +18,7 @@ * This package contains implementations of the * {@link java.util.Iterator Iterator} interface. *

- * You may also consider using + * You may also consider using * {@link org.apache.commons.collections4.IteratorUtils IteratorUtils}, * which is a single class that uses static methods to construct instances * of the classes in this package.