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> voidinvoke(ConsumerWithException<I> in, I i) Invoke aConsumerWithException.static <I,O> O invoke(FunctionWithException<I, O> in, I i) Invoke aFunctionWithException.static <O> Oinvoke(SupplierWithException<O> in) Invoke aSupplierWithException.static voidInvoke 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
nullon failure
-