default Try<T> |
Try.mapFailure(API.Match.Case<? extends java.lang.Throwable,? extends java.lang.Throwable>... cases) |
Maps the cause to a new exception if this is a Failure or returns this instance if this is a Success .
|
default <X extends java.lang.Throwable> Try<T> |
Try.onFailure(java.lang.Class<X> exceptionType,
java.util.function.Consumer<? super X> action) |
Consumes the cause if this is a Try.Failure and the cause is instance of X .
|
default <X extends java.lang.Throwable> Try<T> |
Try.recover(java.lang.Class<X> exceptionType,
java.util.function.Function<? super X,? extends T> f) |
Returns this , if this is a Success or this is a Failure and the cause is not assignable
from cause.getClass() .
|
default <X extends java.lang.Throwable> Try<T> |
Try.recover(java.lang.Class<X> exceptionType,
T value) |
Returns this , if this is a Try.Success or this is a Failure and the cause is not assignable
from cause.getClass() .
|
default <X extends java.lang.Throwable> Try<T> |
Try.recoverWith(java.lang.Class<X> exceptionType,
Try<? extends T> recovered) |
Recovers this Try with the given recovered , if this is a Try.Failure
and the given exceptionType is assignable to the underlying cause type.
|
default <X extends java.lang.Throwable> Try<T> |
Try.recoverWith(java.lang.Class<X> exceptionType,
java.util.function.Function<? super X,Try<? extends T>> f) |
Returns this , if this is a Success or this is a Failure and the cause is not assignable
from cause.getClass() .
|