public static class DoubleConsumer.Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static DoubleConsumer |
andThen(DoubleConsumer c1,
DoubleConsumer c2)
Composes
DoubleConsumer calls. |
static DoubleConsumer |
safe(ThrowableDoubleConsumer<java.lang.Throwable> throwableConsumer)
Creates a safe
DoubleConsumer. |
static DoubleConsumer |
safe(ThrowableDoubleConsumer<java.lang.Throwable> throwableConsumer,
DoubleConsumer onFailedConsumer)
Creates a safe
DoubleConsumer. |
public static DoubleConsumer andThen(@NotNull DoubleConsumer c1, @NotNull DoubleConsumer c2)
DoubleConsumer calls.
c1.accept(value); c2.accept(value);
c1 - the first DoubleConsumerc2 - the second DoubleConsumerDoubleConsumerjava.lang.NullPointerException - if c1 or c2 is nullpublic static DoubleConsumer safe(@NotNull ThrowableDoubleConsumer<java.lang.Throwable> throwableConsumer)
DoubleConsumer.throwableConsumer - the consumer that may throw an exceptionDoubleConsumerjava.lang.NullPointerException - if throwableConsumer is nullsafe(com.annimon.stream.function.ThrowableDoubleConsumer, com.annimon.stream.function.DoubleConsumer)public static DoubleConsumer safe(@NotNull ThrowableDoubleConsumer<java.lang.Throwable> throwableConsumer, @Nullable DoubleConsumer onFailedConsumer)
DoubleConsumer.throwableConsumer - the consumer that may throw an exceptiononFailedConsumer - the consumer which applies if exception was thrownDoubleConsumerjava.lang.NullPointerException - if throwableConsumer is nullsafe(com.annimon.stream.function.ThrowableDoubleConsumer)