java.util.function.DoubleConsumer@FunctionalInterface
public interface ThrowingDoubleConsumer
extends java.util.function.DoubleConsumer
double-valued argument and returns no result, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default void |
accept(double argument) |
Performs this operation on the given argument.
|
void |
acceptThrowing(double argument) |
Performs this operation on the given argument.
|
default java.util.function.DoubleConsumer |
fallbackTo(java.util.function.DoubleConsumer fallback) |
Returns a
DoubleConsumer performing the given operation on the argument if this operation throws an exception. |
default java.util.function.DoubleConsumer |
fallbackTo(java.util.function.DoubleConsumer fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
DoubleConsumer performing the given operation on the argument if this operation throws an exception. |
default ThrowingDoubleConsumer |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingDoubleConsumer throwing an exception of the given type if this operation throws an exception. |
default ThrowingDoubleConsumer |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingDoubleConsumer throwing an exception of the given type if this operation throws an exception. |
default ThrowingDoubleConsumer |
orTryWith(ThrowingDoubleConsumer other) |
Returns a
ThrowingDoubleConsumer performing the given operation on the argument if this operation throws an exception. |
default ThrowingDoubleConsumer |
orTryWith(ThrowingDoubleConsumer other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingDoubleConsumer performing the given operation on the argument if this operation throws an exception. |
default void accept(double argument)
UncheckedException.accept in interface java.util.function.DoubleConsumervoid acceptThrowing(double argument)
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.DoubleConsumer fallbackTo(java.util.function.DoubleConsumer fallback)
DoubleConsumer performing the given operation on the argument if this operation throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.DoubleConsumer fallbackTo(java.util.function.DoubleConsumer fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
DoubleConsumer performing the given operation on the argument if this operation throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault ThrowingDoubleConsumer orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingDoubleConsumer throwing an exception of the given type if this operation throws an exception.
The original exception thrown by this operation is the cause of the thrown exception.
The exception class must have a constructor accepting a single Throwable as an argument.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingDoubleConsumer orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingDoubleConsumer throwing an exception of the given type if this operation throws an exception.
The original exception thrown by this operation is the cause of the thrown exception.
The exception class must have a constructor accepting String and Throwable as arguments.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingDoubleConsumer orTryWith(ThrowingDoubleConsumer other)
ThrowingDoubleConsumer performing the given operation on the argument if this operation throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingDoubleConsumer orTryWith(ThrowingDoubleConsumer other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingDoubleConsumer performing the given operation on the argument if this operation throws an exception.java.lang.IllegalArgumentException - if other is null