Public Member Functions | |
Result (int lineNo, String errorMessage) | |
Result (Argument answer) | |
boolean | isValid () |
String | toString () |
Public Attributes | |
final Argument | answer |
final int | lineNo |
final String | errorMessage |
Static Public Attributes | |
static final Result | INVALID = new Result(null) |
A Result object is created when an expression or algorithm has been evaluated.
To be safe when using the result it is best to see if it is valid with the isValid() method.
org.qscript.Result.Result | ( | int | lineNo, |
String | errorMessage | ||
) |
Fail result.
lineNo | line number where the error occurred |
errorMessage | textual description of the error |
org.qscript.Result.Result | ( | Argument | answer | ) |
Success result.
answer |
boolean org.qscript.Result.isValid | ( | ) |
Is the answer valid
String org.qscript.Result.toString | ( | ) |
return error message if argument is invalid else return String representation of the argument.
final Argument org.qscript.Result.answer |
The answer to the script
final String org.qscript.Result.errorMessage |
Error description
final int org.qscript.Result.lineNo |
Line number where the error (if any) occurred