Package com.guinetik.examples
Class HelloTerminal.TaskResult
java.lang.Object
com.guinetik.examples.HelloTerminal.TaskResult
- Enclosing class:
- HelloTerminal
Represents the result of an asynchronous task.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskResult(boolean success, String message, Exception error) Creates a new TaskResult. -
Method Summary
-
Constructor Details
-
TaskResult
Creates a new TaskResult.- Parameters:
success- whether the task succeededmessage- the result messageerror- any error that occurred
-
-
Method Details
-
isSuccess
public boolean isSuccess()Checks if the task was successful.- Returns:
- true if successful, false otherwise
-
getMessage
Gets the result message.- Returns:
- the message, or null if failed
-
getError
Gets any error that occurred.- Returns:
- the error, or null if successful
-
toString
-