org.eclipse.ocl.examples.domain.library
Class EvaluatorIterationManager
java.lang.Object
org.eclipse.ocl.examples.domain.library.AbstractIterationManager
org.eclipse.ocl.examples.domain.library.EvaluatorIterationManager
- All Implemented Interfaces:
- DomainIterationManager
- Direct Known Subclasses:
- EvaluatorMultipleIterationManager, EvaluatorSingleIterationManager
public abstract class EvaluatorIterationManager
- extends AbstractIterationManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
collectionValue
@NonNull
protected final CollectionValue collectionValue
body
@NonNull
protected final DomainExpression body
accumulatorVariable
@Nullable
protected final DomainTypedElement accumulatorVariable
EvaluatorIterationManager
public EvaluatorIterationManager(@NonNull
DomainEvaluator evaluator,
@NonNull
DomainExpression body,
@NonNull
CollectionValue collectionValue,
@Nullable
DomainTypedElement accumulatorVariable,
@Nullable
java.lang.Object accumulatorValue)
EvaluatorIterationManager
public EvaluatorIterationManager(@NonNull
EvaluatorIterationManager iterationManager,
@NonNull
CollectionValue collectionValue)
createIterators
protected static EvaluatorIterationManager.ValueIterator[] createIterators(@NonNull
DomainTypedElement[] referredIterators,
@NonNull
DomainEvaluator evaluator,
@NonNull
CollectionValue collectionValue)
evaluateBody
@Nullable
public java.lang.Object evaluateBody()
- Description copied from interface:
DomainIterationManager
- Evaluate the iteration body for the current iterators and return the evaluation result.
This is used by non-iterate iteration that intervene between the body evaluation
and accumulator update.
getAccumulatorValue
@Nullable
public java.lang.Object getAccumulatorValue()
- Description copied from interface:
DomainIterationManager
- Get the current state of the accumulator.
getCollectionValue
@NonNull
public CollectionValue getCollectionValue()
getEvaluationEnvironment
@NonNull
public DomainEvaluationEnvironment getEvaluationEnvironment()
getSourceCollection
@NonNull
public CollectionValue getSourceCollection()
- Description copied from interface:
DomainIterationManager
- Return the source collection over which this (nested) iteration iterates.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
updateAccumulator
@Nullable
public java.lang.Object updateAccumulator(java.lang.Object newValue)
- Description copied from interface:
DomainIterationManager
- Update the accumulator witrh the result of a body iteration.
This implements the body of an iterate iteration for which the accumulator value may
be assigned to a completely independent value.
Returns null for the iteration to continue, non-null to terminate.