Class AbstractLinkedList.LinkedSubListIterator
java.lang.Object
org.apache.commons.collections.list.AbstractLinkedList.LinkedListIterator
org.apache.commons.collections.list.AbstractLinkedList.LinkedSubListIterator
- All Implemented Interfaces:
Iterator
,ListIterator
,OrderedIterator
- Enclosing class:
- AbstractLinkedList
protected static class AbstractLinkedList.LinkedSubListIterator
extends AbstractLinkedList.LinkedListIterator
A list iterator over the linked sub list.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractLinkedList.LinkedSubList
The parent listFields inherited from class org.apache.commons.collections.list.AbstractLinkedList.LinkedListIterator
current, expectedModCount, next, nextIndex, parent
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LinkedSubListIterator
(AbstractLinkedList.LinkedSubList sub, int startIndex) -
Method Summary
Methods inherited from class org.apache.commons.collections.list.AbstractLinkedList.LinkedListIterator
checkModCount, getLastNodeReturned, next, previous, previousIndex, set
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
sub
The parent list
-
-
Constructor Details
-
LinkedSubListIterator
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator
- Specified by:
hasNext
in interfaceListIterator
- Overrides:
hasNext
in classAbstractLinkedList.LinkedListIterator
-
hasPrevious
public boolean hasPrevious()Description copied from interface:OrderedIterator
Checks to see if there is a previous element that can be iterated to.- Specified by:
hasPrevious
in interfaceListIterator
- Specified by:
hasPrevious
in interfaceOrderedIterator
- Overrides:
hasPrevious
in classAbstractLinkedList.LinkedListIterator
- Returns:
true
if the iterator has a previous element
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator
- Overrides:
nextIndex
in classAbstractLinkedList.LinkedListIterator
-
add
- Specified by:
add
in interfaceListIterator
- Overrides:
add
in classAbstractLinkedList.LinkedListIterator
-
remove
public void remove()- Specified by:
remove
in interfaceIterator
- Specified by:
remove
in interfaceListIterator
- Overrides:
remove
in classAbstractLinkedList.LinkedListIterator
-