public final class TurtleCommandResult
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static TurtleCommandResult |
failure()
Create a failed command result with no error message.
|
static TurtleCommandResult |
failure(java.lang.String errorMessage)
Create a failed command result with an error message.
|
java.lang.String |
getErrorMessage()
Get the error message of this command result.
|
java.lang.Object[] |
getResults()
Get the resulting values of this command result.
|
boolean |
isSuccess()
Determine whether the command executed successfully.
|
static TurtleCommandResult |
success()
Create a successful command result with no result.
|
static TurtleCommandResult |
success(java.lang.Object[] results)
Create a successful command result with the given result values.
|
public static TurtleCommandResult success()
public static TurtleCommandResult success(java.lang.Object[] results)
results
- The results of executing this command.public static TurtleCommandResult failure()
public static TurtleCommandResult failure(java.lang.String errorMessage)
errorMessage
- The error message to provide.public boolean isSuccess()
public java.lang.String getErrorMessage()
null
if it was a success.public java.lang.Object[] getResults()
null
if it was a failure.