org.eclipse.ocl.examples.library.iterator
Class CollectIteration

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.values.util.ValuesUtil
      extended by org.eclipse.ocl.examples.domain.library.AbstractFeature
          extended by org.eclipse.ocl.examples.domain.library.AbstractIteration
              extended by org.eclipse.ocl.examples.library.iterator.CollectIteration
All Implemented Interfaces:
LibraryFeature, LibraryIteration

public class CollectIteration
extends AbstractIteration

CollectIteration realizes the Collection::collect() library iteration.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.domain.library.AbstractIteration
AbstractIteration.MutableObject
 
Field Summary
static CollectIteration INSTANCE
           
 
Fields inherited from class org.eclipse.ocl.examples.domain.library.AbstractIteration
CARRY_ON
 
Fields inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil
EMPTY_BAG, EMPTY_SET, FALSE_VALUE, INTEGER_MAX_VALUE, INTEGER_MIN_VALUE, INVALID_VALUE, LONG_MAX_VALUE, LONG_MIN_VALUE, NULL_STRING, NULL_VALUE, ONE_VALUE, TRUE_VALUE, UNLIMITED_VALUE, ZERO_VALUE
 
Constructor Summary
CollectIteration()
           
 
Method Summary
 CollectionValue.Accumulator createAccumulatorValue(DomainEvaluator evaluator, TypeId accumulatorTypeId, TypeId bodyTypeId)
          Create the value that will accumulate the iteration results.
protected  java.lang.Object updateAccumulator(DomainIterationManager iterationManager)
          Update the accumulatorValue with the bodyValue resulting from the current iteration for which the iterators define the context in the environment.
 
Methods inherited from class org.eclipse.ocl.examples.domain.library.AbstractIteration
evaluateIteration, resolveTerminalValue
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil
asBagValue, asBoolean, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asMetaclass, asNavigableObject, asObject, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, bigDecimalValueOf, bigIntegerValueOf, characterValueOf, createBagAccumulatorValue, createBagOfEach, createBagRange, createBagValue, createCollectionAccumulatorValue, createInvalidValue, createObjectValue, createOrderedSetAccumulatorValue, createOrderedSetOfEach, createOrderedSetRange, createOrderedSetValue, createRange, createSequenceAccumulatorValue, createSequenceOfEach, createSequenceRange, createSequenceRange, createSequenceValue, createSetAccumulatorValue, createSetOfEach, createSetRange, createSetValue, createTupleOfEach, createTupleValue, createTupleValue, createTypeValue, getEcoreNumber, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, isBoxed, isCollectionValue, isIntegerNumber, isIntegerValue, isRealNumber, isUnboxed, isUnlimited, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, stringValueOf, throwBooleanInvalidValueException, throwInvalidValueException, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

@NonNull
public static final CollectIteration INSTANCE
Constructor Detail

CollectIteration

public CollectIteration()
Method Detail

createAccumulatorValue

@NonNull
public CollectionValue.Accumulator createAccumulatorValue(@NonNull
                                                                  DomainEvaluator evaluator,
                                                                  @NonNull
                                                                  TypeId accumulatorTypeId,
                                                                  @NonNull
                                                                  TypeId bodyTypeId)
Description copied from interface: LibraryIteration
Create the value that will accumulate the iteration results.


updateAccumulator

@Nullable
protected java.lang.Object updateAccumulator(@NonNull
                                                      DomainIterationManager 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
Parameters:
iterationManager - the iteration context
Returns:
non-CARRY_ON premature result of iteration, or CARRY_ON if complete