org.eclipse.ocl.examples.library.iterator
Class IterateIteration
java.lang.Object
org.eclipse.ocl.examples.library.AbstractFeature
org.eclipse.ocl.examples.library.AbstractIteration<Value>
org.eclipse.ocl.examples.library.iterator.IterateIteration
- All Implemented Interfaces:
- LibraryFeature, LibraryIteration, CallableImplementation
public class IterateIteration
- extends AbstractIteration<Value>
IsUniqueIteration realizes the Collection::isUnique() library iteration.
- Since:
- 3.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final IterateIteration INSTANCE
IterateIteration
public IterateIteration()
evaluate
public Value evaluate(EvaluationVisitor evaluationVisitor,
CollectionValue sourceVal,
LoopExp iterateExp)
throws InvalidValueException
- Description copied from interface:
LibraryIteration
- Return the result of evaluating iterationCall upon sourceVal within the environment
provided by EvaluationVisitor. An invalid return may be indicated by throwing an exception
returning Java null or OCL invalid.
- Parameters:
evaluationVisitor
- the evaluation contextsourceVal
- the source operand for the operationiterateExp
- the iteration and additional arguments
- Returns:
- the evaluated value
- Throws:
InvalidValueException
updateAccumulator
protected Value updateAccumulator(IterationManager<Value> iterationManager)
- Description copied from class:
AbstractIteration
- Update the accumulatorValue with the bodyValue resulting from the current iteration
for which the iterators define the context in the environment.
- Specified by:
updateAccumulator
in class AbstractIteration<Value>
- Parameters:
iterationManager
- the iteration context
- Returns:
- non-null premature result of iteration, or null if complete