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>
An iterator for a SCO List object. Operates from either a delegate or a backing store, and provides iteration through the objects.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSCOListIterator
(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
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
-
Field Details
-
iter
-
ownerSCO
The owning SCO that we are really iterating. -
reverse
private boolean reverseWhether the most recent access operation was a previous()
-
-
Constructor Details
-
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 Details
-
add
- Specified by:
add
in interfaceListIterator<E>
-
hasNext
public boolean hasNext() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<E>
-
next
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<E>
-
previous
- Specified by:
previous
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<E>
-
remove
public void remove() -
set
- Specified by:
set
in interfaceListIterator<E>
-