Package net.glowstone.util.collection
Class SuperListIterator<E>
java.lang.Object
net.glowstone.util.collection.SuperListIterator<E>
- All Implemented Interfaces:
Iterator<E>
,ListIterator<E>
An Iterator which delegates in other iterators.
-
Constructor Summary
ConstructorDescriptionSuperListIterator
(List<List<E>> parents) SuperListIterator
(List<List<E>> parents, int index) Creates an instance.SuperListIterator
(ListIterator<List<E>> parentIterator) -
Method Summary
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 Details
-
SuperListIterator
-
SuperListIterator
-
SuperListIterator
Creates an instance.- Parameters:
parents
- a list of lists to iterate in a flattened mannerindex
- the initial index
-
-
Method Details
-
hasNext
public boolean hasNext() -
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<E>
-
next
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<E>
-
previous
- Specified by:
previous
in interfaceListIterator<E>
-
add
- Specified by:
add
in interfaceListIterator<E>
-
remove
public void remove() -
set
- Specified by:
set
in interfaceListIterator<E>
-