public class GenericListIterator<E> extends Object implements ListIterator<E>
ListIterator.add(Object), remove(), set(Object)) to the wrapped
List which may throw an UnsupportedOperationException if it does not support the procedure.
If the use of an Iterator is not mandatory (e.g. through an API), it is strongly recommended to instead use
Higher Order Programming concepts from "Collection 2.0" types like XGettingList, XList, etc.
and their functional procedures etc.
| Constructor and Description |
|---|
GenericListIterator(XList<E> list) |
GenericListIterator(XList<E> list,
int index) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E e) |
boolean |
hasNext() |
boolean |
hasPrevious() |
E |
next() |
int |
nextIndex() |
E |
previous() |
int |
previousIndex() |
void |
remove() |
void |
set(E e) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic GenericListIterator(XList<E> list) throws IndexBoundsException
IndexBoundsExceptionpublic GenericListIterator(XList<E> list, int index) throws IndexBoundsException
IndexBoundsExceptionpublic void add(E e) throws UnsupportedOperationException
add in interface ListIterator<E>UnsupportedOperationExceptionpublic boolean hasNext()
public boolean hasPrevious()
hasPrevious in interface ListIterator<E>public E next() throws NoSuchElementException
next in interface Iterator<E>next in interface ListIterator<E>NoSuchElementExceptionpublic int nextIndex()
nextIndex in interface ListIterator<E>public E previous() throws NoSuchElementException
previous in interface ListIterator<E>NoSuchElementExceptionpublic int previousIndex()
previousIndex in interface ListIterator<E>public void remove()
throws NoSuchElementException,
UnsupportedOperationException
remove in interface Iterator<E>remove in interface ListIterator<E>NoSuchElementExceptionUnsupportedOperationExceptionpublic void set(E e) throws NoSuchElementException, UnsupportedOperationException
set in interface ListIterator<E>NoSuchElementExceptionUnsupportedOperationExceptionCopyright © 2022 MicroStream Software. All rights reserved.