Module net.luis.utils
Interface ThrowableQuadConsumer<T,U,V,W,X extends Throwable>
- Type Parameters:
T
- The first argument typeU
- The second argument typeV
- The third argument typeW
- The fourth argument 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 four arguments and consumes them.
The
The class is equivalent to
The
FunctionalInterface
method is accept(Object, Object, Object, Object)
.The class is equivalent to
QuadConsumer
, but the functional method can throw a checked exception.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Functional method that takes four arguments and consumes them.Returns a composed consumer of same type that performs,
in sequence, this operation followed by theafter
operation.static <T,
U, V, W>
@NotNull QuadConsumer<T, U, V, W> caught
(@NotNull ThrowableQuadConsumer<T, U, V, W, ? extends Throwable> consumer) Converts a throwable quad-consumer into a quad-consumer that throws a runtime exception when an exception is thrown.
-
Method Details
-
caught
@NotNull static <T,U, @NotNull QuadConsumer<T,V, W> U, caughtV, W> (@NotNull @NotNull ThrowableQuadConsumer<T, U, V, W, ? extends Throwable> consumer) Converts a throwable quad-consumer into a quad-consumer that throws a runtime exception when an exception is thrown.- Type Parameters:
T
- The first argument typeU
- The second argument typeV
- The third argument typeW
- The fourth argument type- Parameters:
consumer
- The throwable quad-consumer- Returns:
- A caught quad-consumer
- Throws:
NullPointerException
- If the throwable quad-consumer is null
-
accept
Functional method that takes four arguments and consumes them.- Parameters:
t
- The first argumentu
- The second argumentv
- The third argumentw
- The fourth argument- Throws:
X
- The exception that can be thrown
-
andThen
@NotNull default @NotNull ThrowableQuadConsumer<T,U, andThenV, W, X> (@NotNull @NotNull ThrowableQuadConsumer<? super T, ? super U, ? super V, ? super W, X> after) Returns a composed consumer of same type that performs,
in sequence, this operation followed by theafter
operation.- Parameters:
after
- The operation to perform after this operation- Returns:
- The composed throwable consumer
- Throws:
NullPointerException
- If the after operation is null
-