R
- return typeE
- exception typeP1
- first parameter typeP2
- second parameter typeP3
- third parameter typeP4
- fourth parameter type@FunctionalInterface public interface FragileFunction4<R,E extends java.lang.Exception,P1,P2,P3,P4> extends FragileFunction1<R,E,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>
Modifier and Type | Method and Description |
---|---|
default R |
apply(ITuple4<? extends P1,? extends P2,? extends P3,? extends P4> tuple4)
Expand a tuple into the arguments of this function.
|
R |
apply(P1 arg1,
P2 arg2,
P3 arg3,
P4 arg4)
Run the function.
|
default Function4<R,P1,P2,P3,P4> |
nonFragile()
Convert this to a non-fragile function which does not throw a checked exception.
|
default Function4<R,P1,P2,P3,P4> |
nonFragile(R fallback)
Convert this to a non-fragile function which does not throw a checked exception.
|
default Function4<R,P1,P2,P3,P4> |
nonFragileX(Function5<? extends R,? super E,? super P1,? super P2,? super P3,? super P4> exceptionHandler)
Convert this to a non-fragile function which does not throw a checked exception.
|
default FragileFunction3<R,E,P2,P3,P4> |
partial1(P1 argument)
Get a partially applied function.
|
default FragileFunction3<R,E,P1,P3,P4> |
partial2(P2 argument)
Get a partially applied function.
|
default FragileFunction3<R,E,P1,P2,P4> |
partial3(P3 argument)
Get a partially applied function.
|
default FragileFunction3<R,E,P1,P2,P3> |
partial4(P4 argument)
Get a partially applied function.
|
nonFragileX
R apply(P1 arg1, P2 arg2, P3 arg3, P4 arg4) throws E extends java.lang.Exception
arg1
- first argumentarg2
- second argumentarg3
- third argumentarg4
- fourth argumentE
- typed exceptionE extends java.lang.Exception
default R apply(@NotNull ITuple4<? extends P1,? extends P2,? extends P3,? extends P4> tuple4) throws E extends java.lang.Exception
apply
in interface FragileFunction1<R,E extends java.lang.Exception,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>
tuple4
- tuple to expandE
- typed exceptionE extends java.lang.Exception
@NotNull default Function4<R,P1,P2,P3,P4> nonFragile()
WrappedFragileException
for any
checked exception thrown during apply(Object, Object, Object, Object)
.nonFragile
in interface FragileFunction1<R,E extends java.lang.Exception,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>
Function4.nonFragile(FragileFunction4)
@NotNull default Function4<R,P1,P2,P3,P4> 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,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>
fallback
- fallback valueFunction4.nonFragile(FragileFunction4, Object)
@NotNull default Function4<R,P1,P2,P3,P4> nonFragileX(@NotNull Function5<? extends R,? super E,? super P1,? super P2,? super P3,? super P4> 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 exceptionFunction4.nonFragileX(FragileFunction4, Function5)
@NotNull default FragileFunction3<R,E,P2,P3,P4> partial1(P1 argument)
argument
- value applied for first argument@NotNull default FragileFunction3<R,E,P1,P3,P4> partial2(P2 argument)
argument
- value applied for second argument@NotNull default FragileFunction3<R,E,P1,P2,P4> partial3(P3 argument)
argument
- value applied for third argument