public static class LongConsumer.Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static LongConsumer |
andThen(LongConsumer c1,
LongConsumer c2)
Composes
LongConsumer calls. |
static LongConsumer |
safe(ThrowableLongConsumer<Throwable> throwableConsumer)
Creates a safe
LongConsumer. |
static LongConsumer |
safe(ThrowableLongConsumer<Throwable> throwableConsumer,
LongConsumer onFailedConsumer)
Creates a safe
LongConsumer. |
public static LongConsumer andThen(LongConsumer c1, LongConsumer c2)
LongConsumer calls.
c1.accept(value); c2.accept(value);
c1 - the first LongConsumerc2 - the second LongConsumerLongConsumerNullPointerException - if c1 or c2 is nullpublic static LongConsumer safe(ThrowableLongConsumer<Throwable> throwableConsumer)
LongConsumer.throwableConsumer - the consumer that may throw an exceptionLongConsumerNullPointerException - if throwableConsumer is nullsafe(com.annimon.stream.function.ThrowableLongConsumer, com.annimon.stream.function.LongConsumer)public static LongConsumer safe(ThrowableLongConsumer<Throwable> throwableConsumer, LongConsumer onFailedConsumer)
LongConsumer.throwableConsumer - the consumer that may throw an exceptiononFailedConsumer - the consumer which applies if exception was thrownLongConsumerNullPointerException - if throwableConsumer is nullsafe(com.annimon.stream.function.ThrowableLongConsumer)Copyright © 2018. All rights reserved.