public abstract class SelectorTransform extends AbstractTransform
Modifier and Type | Class and Description |
---|---|
protected class |
SelectorTransform.Context
Context.
|
Proxied.Abstract
Constructor and Description |
---|
SelectorTransform(SelectorEngine engine)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
Optional<PointValue> |
applyTo(ResultValue resultValue,
Batch batch)
Applies the program to provide the specified result value.
|
protected boolean |
executeFinalProgram(Task task,
Optional<Program> finalProgram)
Executes the final program.
|
protected boolean |
executeInitialProgram(Task task,
Optional<Program> initialProgram)
Executes the initial program.
|
protected boolean |
executeStepProgram(Task task,
Optional<Program> stepProgram)
Executes the step program.
|
Optional<? extends Transform> |
getInstance(Point point)
Gets an appropriate instance of this transform for the point.
|
protected abstract SelectorTransform.Context |
newContext(ResultValue resultValue,
Batch batch)
Returns a new context.
|
protected abstract Optional<PointValue> |
returnResult(ResultValue resultValue,
Optional<PointValue> pointValue)
Returns a result.
|
protected abstract Class<? extends SelectedBehavior> |
selectedBehaviorClass()
Returns the selected behavior class.
|
protected abstract Class<? extends SelectsBehavior> |
selectsBehaviorClass()
Returns the selects behavior class.
|
boolean |
setUp(Metadata metadata,
ProxyEntity proxyEntity)
Sets up the instance for action.
|
addUpdate, isNullRemoves, setUp, usesFetchedResult
getMetadata, getName, getParams, getProxyEntity, getThisLogger, tearDown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getParams, getProxyEntity, tearDown
public SelectorTransform(@Nonnull SelectorEngine engine)
engine
- The selector engine.public Optional<PointValue> applyTo(ResultValue resultValue, Batch batch)
When this method is called, the result value must have been provided with all its needed input values.
Note: the returned value is not required to be an instance of the ResultValue class.
resultValue
- The result value needing update.batch
- The current batch.public Optional<? extends Transform> getInstance(Point point)
getInstance
in interface Transform
getInstance
in class AbstractTransform
point
- The point.public boolean setUp(Metadata metadata, ProxyEntity proxyEntity)
setUp
in interface Proxied
setUp
in class AbstractTransform
metadata
- The metadata available to the current process.proxyEntity
- The proxy entity refering to the proxied.@CheckReturnValue protected boolean executeFinalProgram(@Nonnull Task task, @Nonnull Optional<Program> finalProgram)
task
- The current task.finalProgram
- The optional final program.@CheckReturnValue protected boolean executeInitialProgram(@Nonnull Task task, @Nonnull Optional<Program> initialProgram)
task
- The current task.initialProgram
- The optional initial program.@CheckReturnValue protected boolean executeStepProgram(@Nonnull Task task, @Nonnull Optional<Program> stepProgram)
task
- The current task.stepProgram
- The optional step program.@Nonnull @CheckReturnValue protected abstract SelectorTransform.Context newContext(@Nonnull ResultValue resultValue, @Nonnull Batch batch)
resultValue
- The requested result value.batch
- The current batch context.@Nonnull @CheckReturnValue protected abstract Optional<PointValue> returnResult(@Nonnull ResultValue resultValue, @Nonnull Optional<PointValue> pointValue)
resultValue
- The result value.pointValue
- The optional point value@Nonnull @CheckReturnValue protected abstract Class<? extends SelectedBehavior> selectedBehaviorClass()
@Nonnull @CheckReturnValue protected abstract Class<? extends SelectsBehavior> selectsBehaviorClass()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.