Uses of Interface
dk.cloudcreate.essentials.shared.functional.TripleFunction
-
-
Uses of TripleFunction in dk.cloudcreate.essentials.shared.functional
Methods in dk.cloudcreate.essentials.shared.functional that return TripleFunction Modifier and Type Method Description default <V> TripleFunction<T1,T2,T3,V>TripleFunction. andThen(Function<? super R,? extends V> after)Returns a composed function that first applies this function to its input, and then applies the after function to the result.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 returnedapply(Object, Object, Object)method delegates directly to theCheckedTripleFunction.apply(Object, Object, Object)and catches any thrown checkedException's and rethrows them as aCheckedExceptionRethrownException
Unless you provide a context-message (usingCheckedTripleFunction.safe(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 theapply(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 returnedapply(Object, Object, Object)method delegates directly to theCheckedTripleFunction.apply(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 theapply(Object, Object, Object). -
Uses of TripleFunction in dk.cloudcreate.essentials.shared.functional.tuple
Methods in dk.cloudcreate.essentials.shared.functional.tuple with parameters of type TripleFunction Modifier and Type Method Description <R1,R2,R3>
Triple<R1,R2,R3>Triple. map(TripleFunction<? super T1,? super T2,? super T3,Triple<R1,R2,R3>> mappingFunction)Maps the elements of thisTripleusing the mapping function -
Uses of TripleFunction in dk.cloudcreate.essentials.shared.functional.tuple.comparable
Methods in dk.cloudcreate.essentials.shared.functional.tuple.comparable with parameters of type TripleFunction Modifier and Type Method Description <R1 extends Comparable<? super R1>,R2 extends Comparable<? super R2>,R3 extends Comparable<? super R3>>
ComparableTriple<R1,R2,R3>ComparableTriple. map(TripleFunction<? super T1,? super T2,? super T3,ComparableTriple<R1,R2,R3>> mappingFunction)Maps the elements of thisComparableTripleusing the mapping function
-