A - The only parameter of the Function.RESULT - The type of the result of the Function.public class FunctionExecutionBuilder<A,RESULT> extends ExecutionBuilder<Function<A,RESULT>,RESULT>
ExecutionBuilder that does the same as a GenericFunctionExecutionBuilder but instead of returning a
SupplierExecutionBuilder on the with param, builds it and calls SupplierExecutionBuilder.execute() on
it.| Constructor and Description |
|---|
FunctionExecutionBuilder(Function<A,RESULT> lambda,
List<Object> params,
ExecutionContext context)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RESULT |
withParam(A param)
Downgrades the
FunctionExecutionBuilder to a SupplierExecutionBuilder by completing the last
parameter and then calls SupplierExecutionBuilder.execute() on it. |
<INPUT> RESULT |
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, getParamspublic FunctionExecutionBuilder(Function<A,RESULT> lambda, List<Object> params, ExecutionContext context)
lambda - The Function to execute.params - The parameters already accumulated when creating this ExecutionBuilder.context - The ExecutionContext that contains all the listeners and handlers of the execution.public RESULT withParam(A param)
FunctionExecutionBuilder to a SupplierExecutionBuilder by completing the last
parameter and then calls SupplierExecutionBuilder.execute() on it. Then returns the result of the
execution.param - The last parameter.public <INPUT> RESULT 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 last parameter.parser - The Parser that converts from the unparsed input to the required parameter of the execution.Copyright © 2018. All rights reserved.