Package one.microstream.util.iterables
Class ReadOnlyListIterator<E>
java.lang.Object
one.microstream.util.iterables.ReadOnlyListIterator<E>
- All Implemented Interfaces:
- Iterator<E>,- ListIterator<E>
public class ReadOnlyListIterator<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.
 
 Note that while implementing  ListIterator, this iterator can handle any sequence as it is read only,
 meaning it can be used for iterating e.g.  XGettingEnum collections as well.
- 
Constructor SummaryConstructors Constructor Description ReadOnlyListIterator(XGettingSequence<E> list)ReadOnlyListIterator(XGettingSequence<E> list, int index)
- 
Method Summary
- 
Constructor Details
- 
Method Details- 
add- Specified by:
- addin interface- ListIterator<E>
- Throws:
- UnsupportedOperationException
 
- 
hasNextpublic boolean hasNext()
- 
hasPreviouspublic boolean hasPrevious()- Specified by:
- hasPreviousin interface- ListIterator<E>
 
- 
next- Specified by:
- nextin interface- Iterator<E>
- Specified by:
- nextin interface- ListIterator<E>
- Throws:
- NoSuchElementException
 
- 
nextIndexpublic int nextIndex()- Specified by:
- nextIndexin interface- ListIterator<E>
 
- 
previous- Specified by:
- previousin interface- ListIterator<E>
- Throws:
- NoSuchElementException
 
- 
previousIndexpublic int previousIndex()- Specified by:
- previousIndexin interface- ListIterator<E>
 
- 
remove- Specified by:
- removein interface- Iterator<E>
- Specified by:
- removein interface- ListIterator<E>
- Throws:
- NoSuchElementException
- UnsupportedOperationException
 
- 
set- Specified by:
- setin interface- ListIterator<E>
- Throws:
- NoSuchElementException
- UnsupportedOperationException
 
 
-