org.eclipse.ocl.examples.library.iterator
Class SortedByIteration
java.lang.Object
org.eclipse.ocl.examples.domain.values.util.ValuesUtil
org.eclipse.ocl.examples.domain.library.AbstractFeature
org.eclipse.ocl.examples.domain.library.AbstractIteration
org.eclipse.ocl.examples.library.iterator.SortedByIteration
- All Implemented Interfaces:
- LibraryFeature, LibraryIteration
public class SortedByIteration
- extends AbstractIteration
SelectIteration realizes the Collection::sortedBy() library iteration.
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 |
Methods inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil |
asBagValue, asBoolean, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asNavigableObject, asObject, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, 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, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, isBoxed, isCollectionValue, isIntegerValue, isUnboxed, isUnlimited, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, stringValueOf, throwInvalidValueException, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
@NonNull
public static final SortedByIteration INSTANCE
SortedByIteration
public SortedByIteration()
createAccumulatorValue
@NonNull
public SortedByIteration.SortingValue createAccumulatorValue(@NonNull
DomainEvaluator evaluator,
@NonNull
TypeId accumulatorTypeId,
@NonNull
TypeId bodyTypeId)
- Description copied from interface:
LibraryIteration
- Create the value that will accumulate the iteration results.
- Parameters:
evaluator
- that supervises evaluation
- Returns:
- the accumulator
resolveTerminalValue
@NonNull
protected java.lang.Object resolveTerminalValue(@NonNull
DomainIterationManager iterationManager)
- Description copied from class:
AbstractIteration
- Return the final result at the end of an iteration over all the source elements. The
default implementation just returns the accumulator. Derived iterations should
override.
This method is bypassed if the iteration ends prematurely.
- Overrides:
resolveTerminalValue
in class AbstractIteration
- Parameters:
iterationManager
- the iteration context
- Returns:
- the result
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