A - The type of the first parameter of the AtlanticLambda type that this ExecutionBuilder handles.L - The AtlanticLambda type that this ExecutionBuilder handles.NEXT - The type of the ExecutionBuilder that this one downgrades to.RESULT - The type of result returned by the execution.public abstract class GenericFunctionExecutionBuilder<A,L extends AtlanticFunction<A,D>,D extends AtlanticLambda,NEXT extends ExecutionBuilder,RESULT> extends ExecutionBuilder<L,RESULT>
ExecutionBuilder. Provides the withParam(Object) and
withParam(Object, Parser) methods that allow the downgrade of the lambda functions by adding a parameter to
them.
The withParam(Object) method creates a downgraded instance of the ExecutionBuilder that has an already
defined parameter set to it.
The withParam(Object, Parser) does the same as the withParam(Object) method but accepts a parser
that converts the input before doing so.| Modifier | Constructor and Description |
|---|---|
protected |
GenericFunctionExecutionBuilder(L lambda,
List<Object> params,
ExecutionContext<RESULT> context,
TriFunction<D,List<Object>,ExecutionContext,NEXT> nextExecutionBuilderConstructor)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
NEXT |
withParam(A param)
Downgrades the
ExecutionBuilder to the next level by adding a parameter to it. |
<INPUT> NEXT |
withParam(INPUT input,
Parser<INPUT,A> parser)
As
withParam(Object) but converts the input to the required value of the param using a Parser. |
getContext, getLambda, getParamsprotected GenericFunctionExecutionBuilder(L lambda, List<Object> params, ExecutionContext<RESULT> context, TriFunction<D,List<Object>,ExecutionContext,NEXT> nextExecutionBuilderConstructor)
lambda - The AtlanticLambda to execute.params - The parameters already accumulated when creating this ExecutionBuilder.context - The ExecutionContext that contains all the listeners and handlers
of the execution.nextExecutionBuilderConstructor - The constructor of the next ExecutionBuilder. The constructor
should match the parameters on ExecutionBuilder.ExecutionBuilder(AtlanticLambda, List, ExecutionContext).public NEXT withParam(A param)
ExecutionBuilder to the next level by adding a parameter to it.param - The parameter that is stored on the context.ExecutionBuilder.public <INPUT> NEXT withParam(INPUT input, Parser<INPUT,A> parser)
withParam(Object) but converts the input to the required value of the param using a Parser.INPUT - The type of the unparsed input.input - The unparsed input.parser - The Parser that converts from the unparsed input to the required parameter of the execution.ExecutionBuilder.Copyright © 2018. All rights reserved.