org.eclipse.ocl.examples.domain.library
Interface LibraryIteration

All Superinterfaces:
LibraryFeature
All Known Implementing Classes:
AbstractIteration, AnyIteration, ClosureIteration, CollectIteration, CollectNestedIteration, ExistsIteration, ForAllIteration, IsUniqueIteration, IterateIteration, OneIteration, OnlyIteration, RejectIteration, SelectIteration, SortedByIteration

public interface LibraryIteration
extends LibraryFeature


Method Summary
 java.lang.Object createAccumulatorValue(DomainEvaluator evaluator, TypeId accumulatorTypeId, TypeId bodyTypeId)
          Create the value that will accumulate the iteration results.
 java.lang.Object evaluateIteration(DomainIterationManager iterationManager)
          Evaluate the iteration under the supervision of an iterationManager.
 

Method Detail

createAccumulatorValue

@NonNull
java.lang.Object createAccumulatorValue(@NonNull
                                                DomainEvaluator evaluator,
                                                @NonNull
                                                TypeId accumulatorTypeId,
                                                @NonNull
                                                TypeId bodyTypeId)
Create the value that will accumulate the iteration results.

Parameters:
evaluator - that supervises evaluation
type - of the accumulator
Returns:
the accumulator
Throws:
InvalidValueException

evaluateIteration

@Nullable
java.lang.Object evaluateIteration(@NonNull
                                            DomainIterationManager iterationManager)
Evaluate the iteration under the supervision of an iterationManager.

Parameters:
iterationManager - the iteration space
Returns:
the result
Throws:
java.lang.Exception
InvalidValueException - if a body evaluates to invalid