org.eclipse.ocl.examples.domain.library
Class AbstractIterationManager

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.library.AbstractIterationManager
All Implemented Interfaces:
DomainIterationManager
Direct Known Subclasses:
EvaluatorIterationManager, ExecutorDoubleIterationManager, ExecutorSingleIterationManager

public abstract class AbstractIterationManager
extends java.lang.Object
implements DomainIterationManager


Field Summary
protected  DomainEvaluator evaluator
           
 
Constructor Summary
AbstractIterationManager(DomainEvaluator evaluator)
           
 
Method Summary
 DomainIterationManager createNestedIterationManager(CollectionValue value)
          Create a nested iteration supervisor.
 Value get()
          Get the current state of the iterator.
 ValueFactory getValueFactory()
          Get the factory for values.
 boolean isOuterIteration()
          Get the current iteration depth.
 NullValue throwInvalidEvaluation(InvalidValueException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.evaluation.DomainIterationManager
advanceIterators, evaluateBody, getAccumulatorValue, hasCurrent, throwInvalidEvaluation, updateBody
 

Field Detail

evaluator

protected final DomainEvaluator evaluator
Constructor Detail

AbstractIterationManager

public AbstractIterationManager(DomainEvaluator evaluator)
Method Detail

createNestedIterationManager

public DomainIterationManager createNestedIterationManager(CollectionValue value)
Description copied from interface: DomainIterationManager
Create a nested iteration supervisor.
This method supports the closure iteration for which there is only a single iterator, and so this method need only be supported by single iterator managers.

Specified by:
createNestedIterationManager in interface DomainIterationManager
Parameters:
value - the nested iteration domain
Returns:
the iteration space

get

public Value get()
Description copied from interface: DomainIterationManager
Get the current state of the iterator.
This is only supported for single iterator iterations.

Specified by:
get in interface DomainIterationManager

getValueFactory

public ValueFactory getValueFactory()
Description copied from interface: DomainIterationManager
Get the factory for values.

Specified by:
getValueFactory in interface DomainIterationManager

isOuterIteration

public boolean isOuterIteration()
Description copied from interface: DomainIterationManager
Get the current iteration depth.
This is only supported for single iterator recursive iterations such as closure.

Specified by:
isOuterIteration in interface DomainIterationManager

throwInvalidEvaluation

public NullValue throwInvalidEvaluation(InvalidValueException e)
Specified by:
throwInvalidEvaluation in interface DomainIterationManager