Package com.dianxin.tori.base.concurrent
Class FutureAction.Result<T>
java.lang.Object
com.dianxin.tori.base.concurrent.FutureAction.Result<T>
- Enclosing interface:
FutureAction<T>
A wrapper class to safely hold either the success value or the thrown exception.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> @NotNull FutureAction.Result<E> get()@Nullable Throwablebooleanbooleanstatic <E> @NotNull FutureAction.Result<E> success(E value)
-
Method Details
-
success
-
failure
@NotNull public static <E> @NotNull FutureAction.Result<E> failure(@NotNull @NotNull Throwable error) -
isFailure
public boolean isFailure() -
isSuccess
public boolean isSuccess() -
get
-
getFailure
-