java.lang.Object
xyz.ronella.trivial.command.Invoker
Invokes an implementation of basic functional interfaces.
- Since:
- 2019-11-28
-
Method Summary
Modifier and TypeMethodDescriptionstatic <TYPE_ARG1,TYPE_ARG2>
voidexecute(BiConsumer<TYPE_ARG1, TYPE_ARG2> logic) Executes an implementation BiConsumer but passed in nulls for the arguments.static <TYPE_ARG1,TYPE_ARG2>
voidexecute(BiConsumer<TYPE_ARG1, TYPE_ARG2> logic, TYPE_ARG1 arg1, TYPE_ARG2 arg2) Executes an implementation BiConsumer.static <TYPE> voidExecutes an implementation Consumer but passed in null to the argument.static <TYPE> voidExecutes an implementation Consumer.static <TYPE_RETURN>
TYPE_RETURNExecutes an implementation of Supplier.static voidExecutes an implementation of Sinkstatic <TYPE_ARG1,TYPE_ARG2, TYPE_RETURN>
TYPE_RETURNprocess(BiFunction<TYPE_ARG1, TYPE_ARG2, TYPE_RETURN> logic, TYPE_ARG1 arg1, TYPE_ARG2 arg2) Executes an implementation of BiFunction.static <TYPE_ARG,TYPE_RETURN>
TYPE_RETURNExecutes an implementation of Function.
-
Method Details
-
execute
public static <TYPE_ARG1,TYPE_ARG2> void execute(BiConsumer<TYPE_ARG1, TYPE_ARG2> logic, TYPE_ARG1 arg1, TYPE_ARG2 arg2) Executes an implementation BiConsumer.- Type Parameters:
TYPE_ARG1- The type of the first parameter.TYPE_ARG2- The type of the second parameter.- Parameters:
logic- The BiConsumer implementation.arg1- The first parameter for the BiConsumer.arg2- The second parameter for the BiConsumer.
-
execute
Executes an implementation BiConsumer but passed in nulls for the arguments.- Type Parameters:
TYPE_ARG1- The type of the first parameter.TYPE_ARG2- The type of the second parameter.- Parameters:
logic- The BiConsumer implementation.- Since:
- 2.0.0
-
process
public static <TYPE_ARG1,TYPE_ARG2, TYPE_RETURN processTYPE_RETURN> (BiFunction<TYPE_ARG1, TYPE_ARG2, TYPE_RETURN> logic, TYPE_ARG1 arg1, TYPE_ARG2 arg2) Executes an implementation of BiFunction.- Type Parameters:
TYPE_ARG1- The type of the first parameter.TYPE_ARG2- The type of the second parameter.TYPE_RETURN- The type of the expected return value.- Parameters:
logic- The BiFunction implementation.arg1- The first parameter for the BiFunction.arg2- The second parameter for the BiFunction.- Returns:
- The output of a BiFunction.
-
execute
Executes an implementation Consumer.- Type Parameters:
TYPE- The type of the parameter.- Parameters:
logic- The Consumer implementation.arg- The parameter for the Consumer.
-
execute
Executes an implementation Consumer but passed in null to the argument.- Type Parameters:
TYPE- The type of the parameter.- Parameters:
logic- The Consumer implementation.- Since:
- 2.0.0
-
process
public static <TYPE_ARG,TYPE_RETURN> TYPE_RETURN process(Function<TYPE_ARG, TYPE_RETURN> logic, TYPE_ARG arg) Executes an implementation of Function.- Type Parameters:
TYPE_ARG- The type of the parameter.TYPE_RETURN- The type of the expected return value.- Parameters:
logic- The Function implementation.arg- The parameter for the Function.- Returns:
- The output of a Function.
-
generate
Executes an implementation of Supplier.- Type Parameters:
TYPE_RETURN- The type of the expected return value.- Parameters:
logic- The Supplier implementation.- Returns:
- The output of a Supplier.
-
plunge
Executes an implementation of Sink- Parameters:
logic- The Sink implementation.
-