RESULT - The type of result returned by the execution to build.public class StaticExecutionBuilderFactory<RESULT> extends ExecutionBuilderFactory<StaticExecutionBuilderFactory<RESULT>,RESULT>
MyResult result = new StaticExecutionBuilderFactory().execute(MyClass::myStaticMethod)
.withParam(param1)
.withParam(param2);
Where myStaticMethod is a static method on the MyClass class, param1 is the first parameter on myStaticMethod,
param2 is the second (and last) parameter on myStaticMethod and MyResult is the returning object of
myStaticMethod. This means that that execution is the equivalent of doing:
MyResult result = MyClass.myStaticMethod.myMethod(param1, param2);
Optionally, an additional execution for this executor can follow the following code:
MyClass newMyClassInstance = new StaticExecutionBuilderFactory().execute(MyClass::new)
.withParam(param1)
.withParam(param2);
Where newMyClassInstance is an instance of the MyClass class, param1 is the first parameter on the constructor,
param2 is the second (and last) parameter on the constructor.
The advantage of doing this in this way is all the wrappers and listeners that we can add to the execution.| Constructor and Description |
|---|
StaticExecutionBuilderFactory() |
| Modifier and Type | Method and Description |
|---|---|
<A,B> BiFunctionExecutionBuilder<A,B,Void> |
execute(BiConsumer<A,B> lambda)
Starts the execution build for a
BiConsumer. |
<A,B,RESULT> |
execute(BiFunction<A,B,RESULT> lambda)
Starts the execution build for a
BiFunction. |
<A,B,UNPARSED_RESULT,RESULT> |
execute(BiFunction<A,B,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
BiFunction parsing the result with a Parser. |
<A> FunctionExecutionBuilder<A,Void> |
execute(Consumer<A> lambda)
Starts the execution build for a
Consumer. |
<A,B,C,D,E,F,G,H,I,J> |
execute(DecaConsumer<A,B,C,D,E,F,G,H,I,J> lambda)
Starts the execution build for a
DecaConsumer. |
<A,B,C,D,E,F,G,H,I,J,RESULT> |
execute(DecaFunction<A,B,C,D,E,F,G,H,I,J,RESULT> lambda)
Starts the execution build for a
DecaFunction. |
<A,B,C,D,E,F,G,H,I,J,UNPARSED_RESULT,RESULT> |
execute(DecaFunction<A,B,C,D,E,F,G,H,I,J,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
DecaFunction parsing the result with a Parser. |
<A,RESULT> FunctionExecutionBuilder<A,RESULT> |
execute(Function<A,RESULT> lambda)
Starts the execution build for a
Function. |
<A,UNPARSED_RESULT,RESULT> |
execute(Function<A,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
|
<A,B,C,D,E,F,G> |
execute(HeptaConsumer<A,B,C,D,E,F,G> lambda)
Starts the execution build for a
HeptaConsumer. |
<A,B,C,D,E,F,G,RESULT> |
execute(HeptaFunction<A,B,C,D,E,F,G,RESULT> lambda)
Starts the execution build for a
HeptaFunction. |
<A,B,C,D,E,F,G,UNPARSED_RESULT,RESULT> |
execute(HeptaFunction<A,B,C,D,E,F,G,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
HeptaFunction parsing the result with a Parser. |
<A,B,C,D,E,F> |
execute(HexaConsumer<A,B,C,D,E,F> lambda)
Starts the execution build for a
HexaConsumer. |
<A,B,C,D,E,F,RESULT> |
execute(HexaFunction<A,B,C,D,E,F,RESULT> lambda)
Starts the execution build for a
HexaFunction. |
<A,B,C,D,E,F,UNPARSED_RESULT,RESULT> |
execute(HexaFunction<A,B,C,D,E,F,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
HexaFunction parsing the result with a Parser. |
<A,B,C,D,E,F,G,H,I> |
execute(NonaConsumer<A,B,C,D,E,F,G,H,I> lambda)
Starts the execution build for a
NonaConsumer. |
<A,B,C,D,E,F,G,H,I,RESULT> |
execute(NonaFunction<A,B,C,D,E,F,G,H,I,RESULT> lambda)
Starts the execution build for a
NonaFunction. |
<A,B,C,D,E,F,G,H,I,UNPARSED_RESULT,RESULT> |
execute(NonaFunction<A,B,C,D,E,F,G,H,I,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
NonaFunction parsing the result with a Parser. |
<A,B,C,D,E,F,G,H> |
execute(OctaConsumer<A,B,C,D,E,F,G,H> lambda)
Starts the execution build for a
OctaConsumer. |
<A,B,C,D,E,F,G,H,RESULT> |
execute(OctaFunction<A,B,C,D,E,F,G,H,RESULT> lambda)
Starts the execution build for a
OctaFunction. |
<A,B,C,D,E,F,G,H,UNPARSED_RESULT,RESULT> |
execute(OctaFunction<A,B,C,D,E,F,G,H,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
OctaFunction parsing the result with a Parser. |
<A,B,C,D,E> |
execute(PentaConsumer<A,B,C,D,E> lambda)
Starts the execution build for a
PentaConsumer. |
<A,B,C,D,E,RESULT> |
execute(PentaFunction<A,B,C,D,E,RESULT> lambda)
Starts the execution build for a
PentaFunction. |
<A,B,C,D,E,UNPARSED_RESULT,RESULT> |
execute(PentaFunction<A,B,C,D,E,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
PentaFunction parsing the result with a Parser. |
void |
execute(Runnable lambda)
Starts the execution build for a
Runnable. |
<RESULT> RESULT |
execute(Supplier<RESULT> lambda)
Starts the execution build for a
Supplier. |
<UNPARSED_RESULT,RESULT> |
execute(Supplier<UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
|
<A,B,C,D> TetraFunctionExecutionBuilder<A,B,C,D,Void> |
execute(TetraConsumer<A,B,C,D> lambda)
Starts the execution build for a
TetraConsumer. |
<A,B,C,D,RESULT> |
execute(TetraFunction<A,B,C,D,RESULT> lambda)
Starts the execution build for a
TetraFunction. |
<A,B,C,D,UNPARSED_RESULT,RESULT> |
execute(TetraFunction<A,B,C,D,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
TetraFunction parsing the result with a Parser. |
<A,B,C> TriFunctionExecutionBuilder<A,B,C,Void> |
execute(TriConsumer<A,B,C> lambda)
Starts the execution build for a
TriConsumer. |
<A,B,C,RESULT> |
execute(TriFunction<A,B,C,RESULT> lambda)
Starts the execution build for a
TriFunction. |
<A,B,C,UNPARSED_RESULT,RESULT> |
execute(TriFunction<A,B,C,UNPARSED_RESULT> lambda,
Parser<UNPARSED_RESULT,RESULT> resultParser)
Starts the execution build for a
TriFunction parsing the result with a Parser. |
build, withDefaultExceptionHandler, withDefaultExceptionHandler, withExceptionHandler, withExceptionHandler, withExecutor, withIgnoredExceptionType, withPostExecutionListener, withPostExecutionListener, withPreExecutionListener, withPreExecutionListenerpublic <A,B,C,D,E,F,G,H,I,J> DecaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,I,J,Void> execute(DecaConsumer<A,B,C,D,E,F,G,H,I,J> lambda)
DecaConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.I - The ninth parameter.J - The tenth parameter.lambda - The consumer to execute.public <A,B,C,D,E,F,G,H,I,J,RESULT> DecaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,I,J,RESULT> execute(DecaFunction<A,B,C,D,E,F,G,H,I,J,RESULT> lambda)
DecaFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.I - The ninth parameter.J - The tenth parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,E,F,G,H,I,J,UNPARSED_RESULT,RESULT> DecaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,I,J,RESULT> execute(DecaFunction<A,B,C,D,E,F,G,H,I,J,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
DecaFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.I - The ninth parameter.J - The tenth parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C,D,E,F,G,H,I> NonaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,I,Void> execute(NonaConsumer<A,B,C,D,E,F,G,H,I> lambda)
NonaConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.I - The ninth parameter.lambda - The consumer to execute.public <A,B,C,D,E,F,G,H,I,RESULT> NonaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,I,RESULT> execute(NonaFunction<A,B,C,D,E,F,G,H,I,RESULT> lambda)
NonaFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.I - The ninth parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,E,F,G,H,I,UNPARSED_RESULT,RESULT> NonaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,I,RESULT> execute(NonaFunction<A,B,C,D,E,F,G,H,I,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
NonaFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.I - The ninth parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C,D,E,F,G,H> OctaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,Void> execute(OctaConsumer<A,B,C,D,E,F,G,H> lambda)
OctaConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.lambda - The consumer to execute.public <A,B,C,D,E,F,G,H,RESULT> OctaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,RESULT> execute(OctaFunction<A,B,C,D,E,F,G,H,RESULT> lambda)
OctaFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,E,F,G,H,UNPARSED_RESULT,RESULT> OctaFunctionExecutionBuilder<A,B,C,D,E,F,G,H,RESULT> execute(OctaFunction<A,B,C,D,E,F,G,H,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
OctaFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.H - The eight parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C,D,E,F,G> HeptaFunctionExecutionBuilder<A,B,C,D,E,F,G,Void> execute(HeptaConsumer<A,B,C,D,E,F,G> lambda)
HeptaConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.lambda - The consumer to execute.public <A,B,C,D,E,F,G,RESULT> HeptaFunctionExecutionBuilder<A,B,C,D,E,F,G,RESULT> execute(HeptaFunction<A,B,C,D,E,F,G,RESULT> lambda)
HeptaFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,E,F,G,UNPARSED_RESULT,RESULT> HeptaFunctionExecutionBuilder<A,B,C,D,E,F,G,RESULT> execute(HeptaFunction<A,B,C,D,E,F,G,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
HeptaFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.G - The seventh parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C,D,E,F> HexaFunctionExecutionBuilder<A,B,C,D,E,F,Void> execute(HexaConsumer<A,B,C,D,E,F> lambda)
HexaConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.lambda - The consumer to execute.public <A,B,C,D,E,F,RESULT> HexaFunctionExecutionBuilder<A,B,C,D,E,F,RESULT> execute(HexaFunction<A,B,C,D,E,F,RESULT> lambda)
HexaFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,E,F,UNPARSED_RESULT,RESULT> HexaFunctionExecutionBuilder<A,B,C,D,E,F,RESULT> execute(HexaFunction<A,B,C,D,E,F,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
HexaFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.F - The sixth parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C,D,E> PentaFunctionExecutionBuilder<A,B,C,D,E,Void> execute(PentaConsumer<A,B,C,D,E> lambda)
PentaConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.lambda - The consumer to execute.public <A,B,C,D,E,RESULT> PentaFunctionExecutionBuilder<A,B,C,D,E,RESULT> execute(PentaFunction<A,B,C,D,E,RESULT> lambda)
PentaFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,E,UNPARSED_RESULT,RESULT> PentaFunctionExecutionBuilder<A,B,C,D,E,RESULT> execute(PentaFunction<A,B,C,D,E,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
PentaFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.E - The fifth parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C,D> TetraFunctionExecutionBuilder<A,B,C,D,Void> execute(TetraConsumer<A,B,C,D> lambda)
TetraConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.lambda - The consumer to execute.public <A,B,C,D,RESULT> TetraFunctionExecutionBuilder<A,B,C,D,RESULT> execute(TetraFunction<A,B,C,D,RESULT> lambda)
TetraFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,D,UNPARSED_RESULT,RESULT> TetraFunctionExecutionBuilder<A,B,C,D,RESULT> execute(TetraFunction<A,B,C,D,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
TetraFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.D - The fourth parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B,C> TriFunctionExecutionBuilder<A,B,C,Void> execute(TriConsumer<A,B,C> lambda)
TriConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.lambda - The consumer to execute.public <A,B,C,RESULT> TriFunctionExecutionBuilder<A,B,C,RESULT> execute(TriFunction<A,B,C,RESULT> lambda)
TriFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,C,UNPARSED_RESULT,RESULT> TriFunctionExecutionBuilder<A,B,C,RESULT> execute(TriFunction<A,B,C,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
TriFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.C - The third parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A,B> BiFunctionExecutionBuilder<A,B,Void> execute(BiConsumer<A,B> lambda)
BiConsumer. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.lambda - The consumer to execute.public <A,B,RESULT> BiFunctionExecutionBuilder<A,B,RESULT> execute(BiFunction<A,B,RESULT> lambda)
BiFunction. This consumer can be either a static method or a constructor.A - The first parameter.B - The second parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,B,UNPARSED_RESULT,RESULT> BiFunctionExecutionBuilder<A,B,RESULT> execute(BiFunction<A,B,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
BiFunction parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.B - The second parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public <A> FunctionExecutionBuilder<A,Void> execute(Consumer<A> lambda)
Consumer. This consumer can be either a static method or a constructor.A - The first parameter.lambda - The consumer to execute.public <A,RESULT> FunctionExecutionBuilder<A,RESULT> execute(Function<A,RESULT> lambda)
Function. This consumer can be either a static method or a constructor.A - The first parameter.RESULT - The expected result of the execution.lambda - The consumer to execute.public <A,UNPARSED_RESULT,RESULT> FunctionExecutionBuilder<A,RESULT> execute(Function<A,UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
Function parsing the result with a Parser. This consumer can
be either a static method or a constructor.A - The first parameter.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.public void execute(Runnable lambda)
Runnable. This consumer can be either a static method or a constructor.lambda - The consumer to execute.public <RESULT> RESULT execute(Supplier<RESULT> lambda)
Supplier. This consumer can be either a static method or a constructor.RESULT - The expected result of the execution.lambda - The consumer to execute.public <UNPARSED_RESULT,RESULT> RESULT execute(Supplier<UNPARSED_RESULT> lambda, Parser<UNPARSED_RESULT,RESULT> resultParser)
Supplier parsing the result with a Parser. This consumer can be
either a static method or a constructor.RESULT - The expected result of the parsed execution.UNPARSED_RESULT - The result of the lambda.lambda - The consumer to execute.resultParser - The instance of Parser that will convert from the result of the function to the
expected result.Copyright © 2019. All rights reserved.