R
- return typeE
- exception typeP1
- first parameter typeP2
- second parameter typeP3
- third parameter type@FunctionalInterface public interface FragileFunction3<R,E extends java.lang.Exception,P1,P2,P3> extends FragileFunction1<R,E,ITuple3<? extends P1,? extends P2,? extends P3>>
Modifier and Type | Method and Description |
---|---|
default R |
apply(ITuple3<? extends P1,? extends P2,? extends P3> tuple3)
Expand a tuple into the arguments of this function.
|
R |
apply(P1 arg1,
P2 arg2,
P3 arg3)
Run the function.
|
default Function3<R,P1,P2,P3> |
nonFragile()
Convert this to a non-fragile function which does not throw a checked exception.
|
default Function3<R,P1,P2,P3> |
nonFragile(R fallback)
Convert this to a non-fragile function which does not throw a checked exception.
|
default Function3<R,P1,P2,P3> |
nonFragileX(Function4<? extends R,? super E,? super P1,? super P2,? super P3> exceptionHandler)
Convert this to a non-fragile function which does not throw a checked exception.
|
default FragileFunction2<R,E,P2,P3> |
partial1(P1 argument)
Get a partially applied function.
|
default FragileFunction2<R,E,P1,P3> |
partial2(P2 argument)
Get a partially applied function.
|
default FragileFunction2<R,E,P1,P2> |
partial3(P3 argument)
Get a partially applied function.
|
nonFragileX
R apply(P1 arg1, P2 arg2, P3 arg3) throws E extends java.lang.Exception
arg1
- first argumentarg2
- second argumentarg3
- third argumentE
- typed exceptionE extends java.lang.Exception
default R apply(@NotNull ITuple3<? extends P1,? extends P2,? extends P3> tuple3) throws E extends java.lang.Exception
apply
in interface FragileFunction1<R,E extends java.lang.Exception,ITuple3<? extends P1,? extends P2,? extends P3>>
tuple3
- tuple to expandE
- typed exceptionE extends java.lang.Exception
@NotNull default Function3<R,P1,P2,P3> nonFragile()
WrappedFragileException
for any
checked exception thrown during apply(Object, Object, Object)
.nonFragile
in interface FragileFunction1<R,E extends java.lang.Exception,ITuple3<? extends P1,? extends P2,? extends P3>>
Function3.nonFragile(FragileFunction3)
@NotNull default Function3<R,P1,P2,P3> nonFragile(R fallback)
fallback
value.
Please note that in this case the exception is completely lost!nonFragile
in interface FragileFunction1<R,E extends java.lang.Exception,ITuple3<? extends P1,? extends P2,? extends P3>>
fallback
- fallback valueFunction3.nonFragile(FragileFunction3, Object)
@NotNull default Function3<R,P1,P2,P3> nonFragileX(@NotNull Function4<? extends R,? super E,? super P1,? super P2,? super P3> exceptionHandler)
exceptionHandler
- handler which can handle the exception how it sees fit.
E.g. throw an unchecked exception (compare nonFragile()
,
return a fallback (compare nonFragile(Object)
),
or do the latter but also log or collect the exceptionFunction3.nonFragileX(FragileFunction3, Function4)
@NotNull default FragileFunction2<R,E,P2,P3> partial1(P1 argument)
argument
- value applied for first argument@NotNull default FragileFunction2<R,E,P1,P3> partial2(P2 argument)
argument
- value applied for second argument