Module net.luis.utils
Interface ThrowableTriFunction<T,U,V,R,X extends Throwable>
- Type Parameters:
T
- The type of the first argumentU
- The type of the second argumentV
- The type of the third argumentR
- The return typeX
- The exception that can be thrown
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface that takes three arguments and returns a value.
The
The class is equivalent to
The
FunctionalInterface
method is apply(Object, Object, Object)
.The class is equivalent to
TriFunction
, but the functional method can throw a checked exception.-
Method Summary
Modifier and TypeMethodDescriptiondefault <S> @NotNull ThrowableTriFunction
<T, U, V, S, X> andThen
(@NotNull ThrowableFunction<? super R, ? extends S, X> after) Returns a composed function that first applies this function to its input,
and then applies theafter
function to the result.Applies the arguments to the function and returns the result.static <T,
U, V, R>
@NotNull TriFunction<T, U, V, R> caught
(@NotNull ThrowableTriFunction<T, U, V, R, ? extends Throwable> function) Converts a throwable tri-function into a tri-function that throws a runtime exception when an exception is thrown.
-
Method Details
-
caught
@NotNull static <T,U, @NotNull TriFunction<T,V, R> U, caughtV, R> (@NotNull @NotNull ThrowableTriFunction<T, U, V, R, ? extends Throwable> function) Converts a throwable tri-function into a tri-function that throws a runtime exception when an exception is thrown.- Type Parameters:
T
- The first argument typeU
- The second argument typeV
- The third argument typeR
- The return type- Parameters:
function
- The throwable tri-function- Returns:
- A caught tri-function
- Throws:
NullPointerException
- If the throwable tri-function is null
-
apply
Applies the arguments to the function and returns the result.- Parameters:
t
- The first argumentu
- The second argumentv
- The third argument- Returns:
- The result
- Throws:
X
- The exception that can be thrown
-
andThen
@NotNull default <S> @NotNull ThrowableTriFunction<T,U, andThenV, S, X> (@NotNull @NotNull ThrowableFunction<? super R, ? extends S, X> after) Returns a composed function that first applies this function to its input,
and then applies theafter
function to the result.- Type Parameters:
S
- The type of the output of theafter
function, and of the composed function- Parameters:
after
- The function to apply after this function is applied- Returns:
- The composed throwable function
- Throws:
NullPointerException
- If the after function is null
-