Class Either<T>

java.lang.Object
com.dslplatform.compiler.client.Either<T>

public final class Either<T> extends Object
  • Field Details

    • value

      private final T value
    • error

      private final Exception error
  • Constructor Details

    • Either

      private Either(T value, Exception error)
  • Method Details

    • isSuccess

      public boolean isSuccess()
    • get

      public T get()
    • whyNot

      public Exception whyNot()
    • explainError

      public String explainError()
    • success

      public static <S> Either<S> success(S value)
    • fail

      public static <F> Either<F> fail(String error)
    • fail

      public static <F> Either<F> fail(Exception error)
    • fail

      public static <F> Either<F> fail(String description, Exception error)