org.apache.commons.collections.list
protected static class AbstractLinkedList.LinkedListIterator extends Object implements ListIterator, OrderedIterator
Field Summary | |
---|---|
protected AbstractLinkedList.Node | current
The last node that was returned by {@link #next()} or {@link
#previous()}. |
protected int | expectedModCount
The modification count that the list is expected to have. |
protected AbstractLinkedList.Node | next
The node that will be returned by {@link #next()}. |
protected int | nextIndex
The index of {@link #next}. |
protected AbstractLinkedList | parent The parent list |
Constructor Summary | |
---|---|
protected | LinkedListIterator(AbstractLinkedList parent, int fromIndex)
Create a ListIterator for a list.
|
Method Summary | |
---|---|
void | add(Object obj) |
protected void | checkModCount()
Checks the modification count of the list is the value that this
object expects.
|
protected AbstractLinkedList.Node | getLastNodeReturned()
Gets the last node returned.
|
boolean | hasNext() |
boolean | hasPrevious() |
Object | next() |
int | nextIndex() |
Object | previous() |
int | previousIndex() |
void | remove() |
void | set(Object obj) |
null
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)}.
Should be accessed through {@link #getLastNodeReturned()} to enforce
this behaviour.Parameters: parent the parent list fromIndex the index to start at
Throws: ConcurrentModificationException If the list's modification count isn't the value that was expected.
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)}.