T - public interface Try<T>
| Modifier and Type | Method and Description |
|---|---|
static <T> Try<T> |
failure(java.lang.Throwable throwable) |
<S> Try<S> |
flatMap(java.util.function.Function<T,Try<S>> f) |
T |
get() |
java.lang.Throwable |
getFailure() |
default boolean |
isFailure() |
boolean |
isSuccess() |
<S> Try<S> |
map(FailableFunction1<T,S> f) |
static <T> Try<T> |
of(FailableFunction0<T> f) |
Try<T> |
recover(FailableFunction1<java.lang.Throwable,Try<T>> f) |
static <T> Try<T> |
success(T value) |
boolean isSuccess()
default boolean isFailure()
T get() throws java.lang.Throwable
java.lang.Throwablejava.lang.Throwable getFailure()
<S> Try<S> map(FailableFunction1<T,S> f)
Try<T> recover(FailableFunction1<java.lang.Throwable,Try<T>> f)
static <T> Try<T> success(T value)
static <T> Try<T> failure(java.lang.Throwable throwable)
static <T> Try<T> of(FailableFunction0<T> f)
Copyright © 2018. All Rights Reserved.