| Modifier and Type | Method and Description |
|---|---|
abstract void |
Try.forEach(ThrowingConsumer<? super T,? extends Exception> consumer)
Accepts a consuming function and applies it to the value if it is a Success.
|
void |
Success.forEach(ThrowingConsumer<? super T,? extends Exception> consumer) |
void |
Failure.forEach(ThrowingConsumer<? super T,? extends Exception> consumer) |
abstract Try<T> |
Try.peek(ThrowingConsumer<? super T,? extends Exception> consumer)
Same as forEach but returns the Try for further chaining
|
Try<T> |
Success.peek(ThrowingConsumer<? super T,? extends Exception> consumer) |
Try<T> |
Failure.peek(ThrowingConsumer<? super T,? extends Exception> consumer) |
Copyright © 2014–2016. All rights reserved.