org.objectweb.speedo.runtime.genclass
Class PIndexedElemIterator
java.lang.Object
|
+--org.objectweb.speedo.runtime.genclass.PIndexedElemIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class PIndexedElemIterator
- extends java.lang.Object
- implements java.util.Iterator
This class is an implementation of the iterator interface. It iterates over
an inner iterator which the elements are GenClassElement. The main roles of
this iterator implementation are
- to skip the GenClassElement marked as deleted
- to resolve PName references if the element are persistent object
- Author:
- Sebastien Chassande-Barrioz
Field Summary |
protected java.util.Iterator |
iter
Is the inner iterator over PIndexexElem instances |
protected org.objectweb.util.monolog.api.Logger |
logger
|
protected GenClassElement |
next
is the next element which has not been deleted |
protected boolean |
nextComputed
indicates if the next element has been computed |
protected javax.jdo.PersistenceManager |
pm
is the persistence manager used to resolve the PName into reference. |
protected java.lang.Object |
synchro
is the object to synchronize if an element must be removed |
Constructor Summary |
PIndexedElemIterator(java.util.Collection _elements,
java.lang.Object _synchro,
javax.jdo.PersistenceManager pm,
org.objectweb.util.monolog.api.Logger l)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iter
protected java.util.Iterator iter
- Is the inner iterator over PIndexexElem instances
next
protected GenClassElement next
- is the next element which has not been deleted
nextComputed
protected boolean nextComputed
- indicates if the next element has been computed
synchro
protected java.lang.Object synchro
- is the object to synchronize if an element must be removed
pm
protected javax.jdo.PersistenceManager pm
- is the persistence manager used to resolve the PName into reference.
If this field has a null value, that means the elements of the gen class
are not references but primitives.
logger
protected org.objectweb.util.monolog.api.Logger logger
PIndexedElemIterator
public PIndexedElemIterator(java.util.Collection _elements,
java.lang.Object _synchro,
javax.jdo.PersistenceManager pm,
org.objectweb.util.monolog.api.Logger l)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator