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