Class TreeList.TreeListIterator<E>
- java.lang.Object
-
- org.apache.commons.collections4.list.TreeList.TreeListIterator<E>
-
- All Implemented Interfaces:
Iterator<E>,ListIterator<E>,OrderedIterator<E>
static class TreeList.TreeListIterator<E> extends Object implements ListIterator<E>, OrderedIterator<E>
A list iterator over the linked list.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTreeListIterator(TreeList<E> parent, int fromIndex)Create a ListIterator for a list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(E obj)protected voidcheckModCount()Checks the modification count of the list is the value that this object expects.booleanhasNext()booleanhasPrevious()Checks to see if there is a previous element that can be iterated to.Enext()intnextIndex()Eprevious()Gets the previous element from the container.intpreviousIndex()voidremove()voidset(E obj)-
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
-
-
-
-
Constructor Detail
-
TreeListIterator
protected TreeListIterator(TreeList<E> parent, int fromIndex) throws IndexOutOfBoundsException
Create a ListIterator for a list.- Parameters:
parent- the parent listfromIndex- the index to start at- Throws:
IndexOutOfBoundsException
-
-
Method Detail
-
checkModCount
protected void checkModCount()
Checks the modification count of the list is the value that this object expects.- Throws:
ConcurrentModificationException- If the list's modification count isn't the value that was expected.
-
hasNext
public boolean hasNext()
-
next
public E next()
-
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 interfaceListIterator<E>- Specified by:
hasPreviousin interfaceOrderedIterator<E>- Returns:
trueif the iterator has a previous element
-
previous
public E previous()
Description copied from interface:OrderedIteratorGets the previous element from the container.- Specified by:
previousin interfaceListIterator<E>- Specified by:
previousin interfaceOrderedIterator<E>- Returns:
- the previous element in the iteration
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfaceListIterator<E>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfaceListIterator<E>
-
remove
public void remove()
-
set
public void set(E obj)
- Specified by:
setin interfaceListIterator<E>
-
add
public void add(E obj)
- Specified by:
addin interfaceListIterator<E>
-
-