public final class OperationResult<SuccessTypeT,FailureTypeT> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T,U> OperationResult<T,U> |
failedResultOf(U value) |
SuccessTypeT |
geResult()
Gets the result of the operation, if successful.
|
FailureTypeT |
getFailure()
Gets the failure reason for the operation, if it failed.
|
boolean |
isSuccessful() |
static <T,U> OperationResult<T,U> |
successfulResultOf(T value) |
public static <T,U> OperationResult<T,U> successfulResultOf(T value)
public static <T,U> OperationResult<T,U> failedResultOf(U value)
public boolean isSuccessful()
public SuccessTypeT geResult()
public FailureTypeT getFailure()