Class AbstractLinkedList.LinkedSubListIterator<E>
- java.lang.Object
-
- org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator<E>
-
- org.apache.commons.collections4.list.AbstractLinkedList.LinkedSubListIterator<E>
-
- All Implemented Interfaces:
Iterator<E>
,ListIterator<E>
,OrderedIterator<E>
- Enclosing class:
- AbstractLinkedList<E>
protected static class AbstractLinkedList.LinkedSubListIterator<E> extends AbstractLinkedList.LinkedListIterator<E>
A list iterator over the linked sub list.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractLinkedList.LinkedSubList<E>
sub
The parent list-
Fields inherited from class org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator
current, expectedModCount, next, nextIndex, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LinkedSubListIterator(AbstractLinkedList.LinkedSubList<E> sub, int startIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(E obj)
boolean
hasNext()
boolean
hasPrevious()
Checks to see if there is a previous element that can be iterated to.int
nextIndex()
void
remove()
-
Methods inherited from class org.apache.commons.collections4.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 Detail
-
sub
protected final AbstractLinkedList.LinkedSubList<E> sub
The parent list
-
-
Constructor Detail
-
LinkedSubListIterator
protected LinkedSubListIterator(AbstractLinkedList.LinkedSubList<E> sub, int startIndex)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<E>
- Specified by:
hasNext
in interfaceListIterator<E>
- Overrides:
hasNext
in classAbstractLinkedList.LinkedListIterator<E>
-
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<E>
- Specified by:
hasPrevious
in interfaceOrderedIterator<E>
- Overrides:
hasPrevious
in classAbstractLinkedList.LinkedListIterator<E>
- Returns:
true
if the iterator has a previous element
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfaceListIterator<E>
- Overrides:
nextIndex
in classAbstractLinkedList.LinkedListIterator<E>
-
add
public void add(E obj)
- Specified by:
add
in interfaceListIterator<E>
- Overrides:
add
in classAbstractLinkedList.LinkedListIterator<E>
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<E>
- Specified by:
remove
in interfaceListIterator<E>
- Overrides:
remove
in classAbstractLinkedList.LinkedListIterator<E>
-
-