Package org.datanucleus.store.types
Class SCOListIterator<E>
- java.lang.Object
-
- org.datanucleus.store.types.SCOListIterator<E>
-
- Type Parameters:
E
- Type of element in the List
- All Implemented Interfaces:
Iterator<E>
,ListIterator<E>
public class SCOListIterator<E> extends Object implements ListIterator<E>
An iterator for a SCO List object. Operates from either a delegate or a backing store, and provides iteration through the objects.
-
-
Constructor Summary
Constructors Constructor Description SCOListIterator(List<E> sco, DNStateManager sm, List<E> theDelegate, ListStore<E> theStore, boolean useDelegate, int startIndex)
Constructor taking the delegate or backing store, and any start index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(E o)
boolean
hasNext()
boolean
hasPrevious()
E
next()
int
nextIndex()
E
previous()
int
previousIndex()
void
remove()
void
set(E o)
-
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 Detail
-
SCOListIterator
public SCOListIterator(List<E> sco, DNStateManager sm, List<E> theDelegate, ListStore<E> theStore, boolean useDelegate, int startIndex)
Constructor taking the delegate or backing store, and any start index.- Parameters:
sco
- Owner SCOsm
- StateManager of SCO List to iteratetheDelegate
- The delegate listtheStore
- The backing store (connected to the DB)useDelegate
- whether to use a delegatestartIndex
- The start index position (any value below 0 will mean start at index 0).
-
-
Method Detail
-
add
public void add(E o)
- Specified by:
add
in interfaceListIterator<E>
-
hasNext
public boolean hasNext()
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interfaceListIterator<E>
-
next
public E next()
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfaceListIterator<E>
-
previous
public E previous()
- Specified by:
previous
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfaceListIterator<E>
-
remove
public void remove()
-
set
public void set(E o)
- Specified by:
set
in interfaceListIterator<E>
-
-