public class Either<T>
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
explainError() |
static <T> Either<T> |
fail(java.lang.String error) |
static <T> Either<T> |
fail(java.lang.Throwable error) |
T |
get() |
boolean |
isSuccess() |
static <T> Either<T> |
success(T value) |
java.lang.Throwable |
whyNot() |
public boolean isSuccess()
public T get()
public java.lang.Throwable whyNot()
public java.lang.String explainError()
public static <T> Either<T> success(T value)
public static <T> Either<T> fail(java.lang.Throwable error)
public static <T> Either<T> fail(java.lang.String error)