Uses of Interface
dk.cloudcreate.essentials.shared.functional.CheckedTripleFunction
-
Packages that use CheckedTripleFunction Package Description dk.cloudcreate.essentials.shared.functional -
-
Uses of CheckedTripleFunction in dk.cloudcreate.essentials.shared.functional
Methods in dk.cloudcreate.essentials.shared.functional with parameters of type CheckedTripleFunction Modifier and Type Method Description static <T1,T2,T3,R>
TripleFunction<T1,T2,T3,R>CheckedTripleFunction. safe(CheckedTripleFunction<T1,T2,T3,R> functionThatCanFailWithACheckedException)Wraps aCheckedTripleFunction(basically a lambda with three arguments that returns a result and which throws a CheckedException) by returning a newTripleFunctioninstance
The returnedTripleFunction.apply(Object, Object, Object)method delegates directly to theapply(Object, Object, Object)and catches any thrown checkedException's and rethrows them as aCheckedExceptionRethrownException
Unless you provide a context-message (usingsafe(String, CheckedTripleFunction)then any caught checkedException's message also becomes theCheckedExceptionRethrownException's message.
AnyRuntimeException's thrown aren't caught and the calling code will receive the originalRuntimeExceptionthrown.
Usage example:
Let's say we have a method calledsomeOperationthat cannot change, but which accepts aTripleFunctionwith the purpose of the calling theTripleFunction.apply(Object, Object, Object).static <T1,T2,T3,R>
TripleFunction<T1,T2,T3,R>CheckedTripleFunction. safe(String contextMessage, CheckedTripleFunction<T1,T2,T3,R> functionThatCanFailWithACheckedException)Wraps aCheckedTripleFunction(basically a lambda with three arguments that returns a result and which throws a CheckedException) by returning a newTripleFunctioninstance
The returnedTripleFunction.apply(Object, Object, Object)method delegates directly to theapply(Object, Object, Object)and catches any thrown checkedException's and rethrows them as aCheckedExceptionRethrownException
AnyRuntimeException's thrown aren't caught and the calling code will receive the originalRuntimeExceptionthrown.
Usage example:
Let's say we have a method calledsomeOperationthat cannot change, but which accepts aTripleFunctionwith the purpose of the calling theTripleFunction.apply(Object, Object, Object).
-