public class ExecutorSingleIterationManager extends AbstractIterationManager
IterationManager.IterationManagerExtension
Modifier and Type | Field and Description |
---|---|
protected LibraryBinaryOperation |
body |
protected CollectionValue |
collectionValue |
protected java.util.Iterator<? extends java.lang.Object> |
iteratorValue |
protected TypeId |
returnTypeId |
evaluator, executor
Modifier | Constructor and Description |
---|---|
|
ExecutorSingleIterationManager(Evaluator evaluator,
TypeId returnTypeId,
LibraryBinaryOperation body,
CollectionValue collectionValue,
java.lang.Object accumulatorValue)
Deprecated.
use Executor
|
protected |
ExecutorSingleIterationManager(ExecutorSingleIterationManager iterationManager,
CollectionValue collectionValue) |
|
ExecutorSingleIterationManager(Executor executor,
TypeId returnTypeId,
LibraryBinaryOperation body,
CollectionValue collectionValue,
java.lang.Object accumulatorValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
advanceIterators()
Advance the iterators to the next iteration, returning false once all possible
iterator states have been exhausted.
|
IterationManager |
createNestedIterationManager(CollectionValue value)
Create a nested iteration supervisor.
|
java.lang.Object |
evaluateBody()
Evaluate the iteration body for the current iterators and return the evaluation result.
|
java.lang.Object |
get()
Get the current state of the iterator.
|
java.lang.Object |
getAccumulatorValue()
Get the current state of the accumulator.
|
int |
getDepth() |
ExecutorSingleIterationManager |
getRootIterationManager() |
CollectionValue |
getSourceCollection()
Return the source collection over which this (nested) iteration iterates.
|
boolean |
hasCurrent()
Return true if the iterators have a step to be evaluated.
|
java.lang.Object |
updateAccumulator(java.lang.Object newValue)
Update the accumulator with the result of a body iteration.
|
dispose, getEvaluator, getExecutor, getStandardLibrary
@NonNull protected final CollectionValue collectionValue
@NonNull protected final TypeId returnTypeId
@NonNull protected final LibraryBinaryOperation body
@NonNull protected final java.util.Iterator<? extends java.lang.Object> iteratorValue
@Deprecated public ExecutorSingleIterationManager(@NonNull Evaluator evaluator, @NonNull TypeId returnTypeId, @NonNull LibraryBinaryOperation body, @Nullable CollectionValue collectionValue, @Nullable java.lang.Object accumulatorValue)
public ExecutorSingleIterationManager(@NonNull Executor executor, @NonNull TypeId returnTypeId, @NonNull LibraryBinaryOperation body, @Nullable CollectionValue collectionValue, @Nullable java.lang.Object accumulatorValue)
protected ExecutorSingleIterationManager(@NonNull ExecutorSingleIterationManager iterationManager, @NonNull CollectionValue collectionValue)
public boolean advanceIterators()
IterationManager
@NonNull public IterationManager createNestedIterationManager(@NonNull CollectionValue value)
IterationManager
createNestedIterationManager
in interface IterationManager
createNestedIterationManager
in class AbstractIterationManager
value
- the nested iteration domain@Nullable public java.lang.Object evaluateBody()
IterationManager
@Nullable public java.lang.Object get()
IterationManager
get
in interface IterationManager
get
in class AbstractIterationManager
@Nullable public java.lang.Object getAccumulatorValue()
IterationManager
public int getDepth()
@NonNull public ExecutorSingleIterationManager getRootIterationManager()
@NonNull public CollectionValue getSourceCollection()
IterationManager
public boolean hasCurrent()
IterationManager
@Nullable public java.lang.Object updateAccumulator(java.lang.Object newValue)
IterationManager