org.processmining.framework.log.rfb
Class LightweightModelElements.LightweightModelElementIterator

java.lang.Object
  extended by org.processmining.framework.log.rfb.LightweightModelElements.LightweightModelElementIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
LightweightModelElements

protected class LightweightModelElements.LightweightModelElementIterator
extends java.lang.Object
implements java.util.Iterator

Typical lightweight iterator over a set of model elements. This iterator stores only a reference to its parent and his internal state as index in the parent's list of model elements.

Notice that the iterator will transparently instantiate the returned model elements as lightweight proxies on the parent.

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected  LightweightModelElements parent
          Reference to fat parent.
protected  int position
          Current position of the iterator on the parent's set of model elements.
 
Constructor Summary
protected LightweightModelElements.LightweightModelElementIterator(LightweightModelElements parent, int position)
          Creates a new lightweight iterator on a set of model elements with its initial position in that set.
 
Method Summary
 boolean hasNext()
          Probes whether further elements are available
 java.lang.Object next()
          Retrieves the next model element from the parent set.
 void remove()
          Not implemented for this iterator!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

protected int position
Current position of the iterator on the parent's set of model elements.


parent

protected LightweightModelElements parent
Reference to fat parent.

Constructor Detail

LightweightModelElements.LightweightModelElementIterator

protected LightweightModelElements.LightweightModelElementIterator(LightweightModelElements parent,
                                                                   int position)
Creates a new lightweight iterator on a set of model elements with its initial position in that set.

Parameters:
parent - reference to fat parent
position - initial position in the parent set
Method Detail

hasNext

public boolean hasNext()
Probes whether further elements are available

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Retrieves the next model element from the parent set.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
Not implemented for this iterator!

Specified by:
remove in interface java.util.Iterator