Package org.apache.sis.internal.util
Class ListOfUnknownSize.Iterator
java.lang.Object
org.apache.sis.internal.util.ListOfUnknownSize.Iterator
- All Implemented Interfaces:
Iterator<E>,ListIterator<E>
- Enclosing class:
- ListOfUnknownSize<E>
The iterator returned by
AbstractList.listIterator(). Provided as a named class instead
than anonymous class for more readable stack traces. This is especially useful since
elements may be loaded or computed when first needed, and those operations may fail.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanhasNext()Whethernext()can succeed.booleanWhetherprevious()can succeed.next()Move forward by one element.intIndex of element to be returned bynext().previous()Move backward by one element.intIndex of element to be returned byprevious().voidremove()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
cursor
private int cursorIndex of the next element to be returned.
-
-
Constructor Details
-
Iterator
Iterator(int index) Creates a new iterator starting at the given index.
-
-
Method Details
-
nextIndex
public int nextIndex()Index of element to be returned bynext().- Specified by:
nextIndexin interfaceListIterator<E>
-
hasNext
public boolean hasNext()Whethernext()can succeed. -
next
Move forward by one element. -
previousIndex
public int previousIndex()Index of element to be returned byprevious().- Specified by:
previousIndexin interfaceListIterator<E>
-
hasPrevious
public boolean hasPrevious()Whetherprevious()can succeed.- Specified by:
hasPreviousin interfaceListIterator<E>
-
previous
Move backward by one element.- Specified by:
previousin interfaceListIterator<E>
-
set
- Specified by:
setin interfaceListIterator<E>
-
add
- Specified by:
addin interfaceListIterator<E>
-
remove
public void remove()
-