org.objectweb.speedo.genclass
Class PIndexedElemIterator

java.lang.Object
  extended by org.objectweb.speedo.genclass.PIndexedElemIterator
All Implemented Interfaces:
java.util.Iterator
Direct Known Subclasses:
ListIteratorImpl

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  POManagerItf pm
          is the persistence manager used to resolve the PName into reference.
protected  StateItf sa
          is the object to synchronize if an element must be removed
 
Constructor Summary
PIndexedElemIterator(java.util.Collection _elements, StateItf _sa, POManagerItf pm, org.objectweb.util.monolog.api.Logger l)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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


sa

protected StateItf sa
is the object to synchronize if an element must be removed


pm

protected POManagerItf 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
Constructor Detail

PIndexedElemIterator

public PIndexedElemIterator(java.util.Collection _elements,
                            StateItf _sa,
                            POManagerItf pm,
                            org.objectweb.util.monolog.api.Logger l)
Method Detail

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