public class Result
extends java.lang.Object
This cannot be allocated directly, instead use
Result.Status.createResult()
,
Result.Status.createResult(String, Throwable)
,
Result.Status.createResult(String)
Result.Status.createResult(Object)
Modifier and Type | Class and Description |
---|---|
static class |
Result.Status
Scene Status enum.
|
Modifier and Type | Method and Description |
---|---|
Result |
getCopyWithData(java.lang.Object data)
Returns a copy of the current result with the added (or replaced) given data
|
java.lang.Object |
getData()
Returns the optional data bundle stored in the result object.
|
java.lang.String |
getErrorMessage()
Returns the error message.
|
java.lang.Throwable |
getException()
Returns the exception.
|
Result.Status |
getStatus()
Returns the status.
|
boolean |
isSuccess()
Returns whether the status is successful.
|
public Result getCopyWithData(java.lang.Object data)
data
- the data bundlepublic boolean isSuccess()
This is the same as calling getStatus() == SceneStatus.SUCCESS
true
if the status is successful.public Result.Status getStatus()
public java.lang.String getErrorMessage()
getStatus()
returns
Result.Status.ERROR_UNKNOWN
public java.lang.Throwable getException()
getStatus()
returns
Result.Status.ERROR_UNKNOWN
public java.lang.Object getData()
null
if none have been set.