Class FutureAction.Result<T>

java.lang.Object
com.dianxin.tori.base.concurrent.FutureAction.Result<T>
Enclosing interface:
FutureAction<T>

public static class FutureAction.Result<T> extends Object
A wrapper class to safely hold either the success value or the thrown exception.
  • Method Details

    • success

      @NotNull public static <E> @NotNull FutureAction.Result<E> success(@Nullable E value)
    • failure

      @NotNull public static <E> @NotNull FutureAction.Result<E> failure(@NotNull @NotNull Throwable error)
    • isFailure

      public boolean isFailure()
    • isSuccess

      public boolean isSuccess()
    • get

      public T get()
    • getFailure

      @Nullable public @Nullable Throwable getFailure()