diff --git a/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java b/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java index 2b9665f24..f832f9fc3 100644 --- a/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java +++ b/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java @@ -172,6 +172,7 @@ public class ArrayListIterator extends ArrayIterator * This iterator does not support modification of its backing collection, and so will * always throw an {@link UnsupportedOperationException} when this method is invoked. * + * @param o the element to add * @throws UnsupportedOperationException always thrown. * @see java.util.ListIterator#set */ @@ -192,6 +193,9 @@ public class ArrayListIterator extends ArrayIterator * not support add() or remove(), set() may be * called as often as desired. * + * @param o the element to set + * @throws IllegalStateException if {@link #next()} or {@link #previous()} has not been called + * before {@link #set(Object)} * @see java.util.ListIterator#set */ public void set(Object o) { diff --git a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableIterator.java b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableIterator.java index f381a9274..664729cd9 100644 --- a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableIterator.java +++ b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableIterator.java @@ -39,6 +39,7 @@ public final class UnmodifiableIterator implements Iterator, Unmodifiable *

* If the iterator is already unmodifiable it is returned directly. * + * @param the element type * @param iterator the iterator to decorate * @return a new unmodifiable iterator * @throws IllegalArgumentException if the iterator is null diff --git a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableListIterator.java b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableListIterator.java index 3f68b675d..b5c9f0eed 100644 --- a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableListIterator.java +++ b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableListIterator.java @@ -37,6 +37,7 @@ public final class UnmodifiableListIterator implements ListIterator, Unmod /** * Decorates the specified iterator such that it cannot be modified. * + * @param the element type * @param iterator the iterator to decorate * @return a new unmodifiable list iterator * @throws IllegalArgumentException if the iterator is null diff --git a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableMapIterator.java b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableMapIterator.java index 83492dd6e..219b334c8 100644 --- a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableMapIterator.java +++ b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableMapIterator.java @@ -36,6 +36,8 @@ public final class UnmodifiableMapIterator implements MapIterator, U /** * Decorates the specified iterator such that it cannot be modified. * + * @param the key type + * @param the value type * @param iterator the iterator to decorate * @return a new unmodifiable map iterator * @throws IllegalArgumentException if the iterator is null diff --git a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIterator.java b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIterator.java index 5063ef293..c65976588 100644 --- a/src/main/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIterator.java +++ b/src/main/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIterator.java @@ -37,6 +37,8 @@ public final class UnmodifiableOrderedMapIterator implements OrderedMapIte /** * Decorates the specified iterator such that it cannot be modified. * + * @param the key type + * @param the value type * @param iterator the iterator to decorate * @return a new unmodifiable ordered map iterator * @throws IllegalArgumentException if the iterator is null diff --git a/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java b/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java index 642a25b43..0e8c490bf 100644 --- a/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java +++ b/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java @@ -427,6 +427,7 @@ public abstract class AbstractLinkedList implements List { * Subclasses can override this to create a different class. * * @param value value of the new node + * @return a new node containing the value */ protected Node createNode(E value) { return new Node(value); @@ -509,6 +510,7 @@ public abstract class AbstractLinkedList implements List { * @param index the index, starting from 0 * @param endMarkerAllowed whether or not the end marker can be returned if * startIndex is set to the list's size + * @return the node at the given index * @throws IndexOutOfBoundsException if the index is less than 0; equal to * the size of the list and endMakerAllowed is false; or greater than the * size of the list @@ -551,6 +553,7 @@ public abstract class AbstractLinkedList implements List { * Creates an iterator for the sublist. * * @param subList the sublist to get an iterator for + * @return a new iterator on the given sublist */ protected Iterator createSubListIterator(LinkedSubList subList) { return createSubListListIterator(subList, 0); @@ -561,6 +564,7 @@ public abstract class AbstractLinkedList implements List { * * @param subList the sublist to get an iterator for * @param fromIndex the index to start from, relative to the sublist + * @return a new list iterator on the given sublist */ protected ListIterator createSubListListIterator(LinkedSubList subList, int fromIndex) { return new LinkedSubListIterator(subList, fromIndex); @@ -749,6 +753,7 @@ public abstract class AbstractLinkedList implements List { * * @param parent the parent list * @param fromIndex the index to start at + * @throws IndexOutOfBoundsException if fromIndex is less than 0 or greater than the size of the list */ protected LinkedListIterator(AbstractLinkedList parent, int fromIndex) throws IndexOutOfBoundsException { super(); @@ -774,9 +779,9 @@ public abstract class AbstractLinkedList implements List { /** * Gets the last node returned. * - * @throws IllegalStateException If {@link #next()} or - * {@link #previous()} haven't been called, or if the node has been removed - * with {@link #remove()} or a new node added with {@link #add(Object)}. + * @return the last node returned + * @throws IllegalStateException If {@link #next()} or {@link #previous()} haven't been called, + * or if the node has been removed with {@link #remove()} or a new node added with {@link #add(Object)}. */ protected Node getLastNodeReturned() throws IllegalStateException { if (current == null) {