| Package | Description |
|---|---|
| com.annimon.stream | |
| com.annimon.stream.function |
| Modifier and Type | Method and Description |
|---|---|
void |
Stream.forEach(Consumer<? super T> action)
Performs the given action to each element.
|
Exceptional<T> |
Exceptional.ifException(Consumer<Throwable> consumer)
Invokes consumer function if there were any exception.
|
<E extends Throwable> |
Exceptional.ifExceptionIs(Class<E> throwableClass,
Consumer<? super E> consumer)
Invokes consumer function if exception class matches
throwableClass. |
void |
Optional.ifPresent(Consumer<? super T> consumer)
Invokes consumer function with value if present.
|
Stream<T> |
Stream.peek(Consumer<? super T> action)
Perform provided action to each elements.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Consumer<T> |
Consumer.Util.andThen(Consumer<? super T> c1,
Consumer<? super T> c2)
Composes
Consumer calls. |
static <T> Consumer<T> |
Consumer.Util.safe(ThrowableConsumer<? super T,Throwable> throwableConsumer)
Creates a safe
Consumer. |
static <T> Consumer<T> |
Consumer.Util.safe(ThrowableConsumer<? super T,Throwable> throwableConsumer,
Consumer<? super T> onFailedConsumer)
Creates a safe
Consumer. |
| Modifier and Type | Method and Description |
|---|---|
static <T> Consumer<T> |
Consumer.Util.andThen(Consumer<? super T> c1,
Consumer<? super T> c2)
Composes
Consumer calls. |
static <T> Consumer<T> |
Consumer.Util.andThen(Consumer<? super T> c1,
Consumer<? super T> c2)
Composes
Consumer calls. |
static <T> Consumer<T> |
Consumer.Util.safe(ThrowableConsumer<? super T,Throwable> throwableConsumer,
Consumer<? super T> onFailedConsumer)
Creates a safe
Consumer. |
Copyright © 2016. All rights reserved.