public class IAResult<R>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
IAResult.Error
Data object holding error information.
|
Modifier and Type | Method and Description |
---|---|
static <R> IAResult<R> |
failure(IAResult.Error error) |
IAResult.Error |
getError()
Return non-null error object in case
isSuccess() return false. |
R |
getResult()
Returns computations result data.
|
boolean |
isSuccess()
Returns if this result represent computation ending with success.
|
static <R> IAResult<R> |
success(R result) |
java.lang.String |
toString() |
public static <R> IAResult<R> success(R result)
public static <R> IAResult<R> failure(IAResult.Error error)
public boolean isSuccess()
public R getResult()
public IAResult.Error getError()
isSuccess()
return false. Describes what went
wrong.public java.lang.String toString()
toString
in class java.lang.Object