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