QScript  2.1.2
Expression and algorithm evaluator
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
org.qscript.Result Class Reference

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)
 

Detailed Description

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.

Author
Peter Lager

Constructor & Destructor Documentation

org.qscript.Result.Result ( int  lineNo,
String  errorMessage 
)

Fail result.

Parameters
lineNoline number where the error occurred
errorMessagetextual description of the error
org.qscript.Result.Result ( Argument  answer)

Success result.

Parameters
answer

Member Function Documentation

boolean org.qscript.Result.isValid ( )

Is the answer valid

Returns
true if the answer and the answer value is not null
String org.qscript.Result.toString ( )

return error message if argument is invalid else return String representation of the argument.

Member Data Documentation

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


The documentation for this class was generated from the following file: