Package rekit.util
Class LambdaUtil
java.lang.Object
rekit.util.LambdaUtil
This class contains several methods to work with Lambdas.
- Author:
- Dominik Fuchss
-
Method Summary
Modifier and TypeMethodDescriptionstatic <I> void
invoke
(ConsumerWithException<I> in, I i) Invoke aConsumerWithException
.static <I,
O> O invoke
(FunctionWithException<I, O> in, I i) Invoke aFunctionWithException
.static <O> O
invoke
(SupplierWithException<O> in) Invoke aSupplierWithException
.static void
Invoke aVoidFunctionWithException
.
-
Method Details
-
invoke
Invoke aFunctionWithException
.- Type Parameters:
I
- the in typeO
- the out type- Parameters:
in
- the functioni
- the input- Returns:
- the output or
null
(in error case)
-
invoke
Invoke aVoidFunctionWithException
.- Parameters:
in
- the function
-
invoke
Invoke aConsumerWithException
.- Type Parameters:
I
- the in type- Parameters:
in
- the functioni
- the input
-
invoke
Invoke aSupplierWithException
.- Type Parameters:
O
- the out type- Parameters:
in
- the function- Returns:
- the return value of the Supplier or
null
on failure
-