Class AbstractLinkedList.LinkedSubListIterator<E>
- java.lang.Object
-
- org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator<E>
-
- org.apache.commons.collections4.list.AbstractLinkedList.LinkedSubListIterator<E>
-
- Type Parameters:
E- the type of elements in this iterator.
- All Implemented Interfaces:
java.util.Iterator<E>,java.util.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>subThe sub list.-
Fields inherited from class org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator
current, expectedModCount, next, nextIndex, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLinkedSubListIterator(AbstractLinkedList.LinkedSubList<E> sub, int startIndex)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(E obj)booleanhasNext()booleanhasPrevious()Checks to see if there is a previous element that can be iterated to.intnextIndex()voidremove()-
Methods inherited from class org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator
checkModCount, getLastNodeReturned, next, previous, previousIndex, set
-
-
-
-
Field Detail
-
sub
protected final AbstractLinkedList.LinkedSubList<E> sub
The sub list.
-
-
Constructor Detail
-
LinkedSubListIterator
protected LinkedSubListIterator(AbstractLinkedList.LinkedSubList<E> sub, int startIndex)
Constructs a new instance.- Parameters:
sub- The sub-list.startIndex- The starting index.
-
-
Method Detail
-
add
public void add(E obj)
- Specified by:
addin interfacejava.util.ListIterator<E>- Overrides:
addin classAbstractLinkedList.LinkedListIterator<E>
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<E>- Specified by:
hasNextin interfacejava.util.ListIterator<E>- Overrides:
hasNextin classAbstractLinkedList.LinkedListIterator<E>
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:OrderedIteratorChecks to see if there is a previous element that can be iterated to.- Specified by:
hasPreviousin interfacejava.util.ListIterator<E>- Specified by:
hasPreviousin interfaceOrderedIterator<E>- Overrides:
hasPreviousin classAbstractLinkedList.LinkedListIterator<E>- Returns:
trueif the iterator has a previous element
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfacejava.util.ListIterator<E>- Overrides:
nextIndexin classAbstractLinkedList.LinkedListIterator<E>
-
-