default Try<T> |
Try.mapFailure(@NonNull API.Match.Case<? extends java.lang.Throwable,? extends java.lang.Throwable> @NonNull ... cases) |
Transforms the cause of this Try.Failure using the given sequence of match cases.
|
default <X extends java.lang.Throwable> Try<T> |
Try.onFailure(@NonNull java.lang.Class<X> exceptionType,
@NonNull java.util.function.Consumer<? super X> action) |
Performs the given action if this Try is a Try.Failure and the cause is an instance of the specified type.
|
default <X extends java.lang.Throwable> Try<T> |
Try.recover(@NonNull java.lang.Class<X> exceptionType,
@NonNull java.util.function.Function<? super X,? extends T> f) |
Attempts to recover from a failure if the cause is an instance of the specified exception type.
|
default <X extends java.lang.Throwable> Try<T> |
Try.recover(@NonNull java.lang.Class<X> exceptionType,
T value) |
Recovers this Try with the given value if this is a Try.Failure
and the underlying cause matches the specified exceptionType.
|
default <X extends java.lang.Throwable> Try<T> |
Try.recoverWith(@NonNull java.lang.Class<X> exceptionType,
@NonNull Try<? extends T> recovered) |
Recovers this Try with the given recovered value if this is a Try.Failure
and the underlying cause is assignable to the specified exceptionType.
|
default <X extends java.lang.Throwable> Try<T> |
Try.recoverWith(@NonNull java.lang.Class<X> exceptionType,
@NonNull java.util.function.Function<? super X,Try<? extends T>> f) |
Attempts to recover from a failure by applying the given recovery function if the cause matches the specified exception type.
|