Package one.microstream.util.iterables
Class GenericListIterator<E>
java.lang.Object
one.microstream.util.iterables.GenericListIterator<E>
- All Implemented Interfaces:
Iterator<E>,ListIterator<E>
public class GenericListIterator<E> extends Object implements ListIterator<E>
Generic (and potentially imperformant!) implementation of a
Routes all modifying procedures (
ListIterator.Routes all modifying procedures (
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 Details
-
Method Details
-
add
- Specified by:
addin interfaceListIterator<E>- Throws:
UnsupportedOperationException
-
hasNext
public boolean hasNext() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator<E>
-
next
- Specified by:
nextin interfaceIterator<E>- Specified by:
nextin interfaceListIterator<E>- Throws:
NoSuchElementException
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<E>
-
previous
- Specified by:
previousin interfaceListIterator<E>- Throws:
NoSuchElementException
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<E>
-
remove
- Specified by:
removein interfaceIterator<E>- Specified by:
removein interfaceListIterator<E>- Throws:
NoSuchElementExceptionUnsupportedOperationException
-
set
- Specified by:
setin interfaceListIterator<E>- Throws:
NoSuchElementExceptionUnsupportedOperationException
-