|
Venice 0.751beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnz.org.venice.parser.expression.AbstractExpression
nz.org.venice.parser.expression.UnaryExpression
nz.org.venice.parser.expression.AlertExpression
An no op expression which when evaluated displays a message. For debugging rules.
| Field Summary |
| Fields inherited from interface nz.org.venice.parser.Expression |
BOOLEAN_TYPE, FALSE, FLOAT_QUOTE_TYPE, FLOAT_TYPE, INTEGER_QUOTE_TYPE, INTEGER_SHORT_TYPE, INTEGER_TYPE, NUMERIC_TYPE, STRING_TYPE, TRUE, TRUE_LEVEL, UNDEFINED_TYPE |
| Constructor Summary | |
AlertExpression(Expression arg,
Expression[] optionalArgs)
Create a new alert expression. |
|
| Method Summary | |
int |
checkType()
Check the argument to the expression. |
java.lang.Object |
clone()
|
double |
evaluate(Variables variables,
QuoteBundle quoteBundle,
Symbol symbol,
int day)
Evaluate the expression and subexpressions, and then display the resulting message. |
Expression |
getChild(int child)
Return the child of this node at the given index. |
int |
getChildCount()
Return the number of children required in an alert expression. |
int |
getType()
Get the type of the expression |
java.lang.String |
toString()
Return a string representing the expression contents. |
| Methods inherited from class nz.org.venice.parser.expression.AbstractExpression |
equals, getId, getIndex, getNumberFormat, getParent, getParseMetadata, hashCode, isRoot, iterator, parseDouble, parseInt, printParents, setChild, setChildMutableVersion, setParent, setParseMetadata, simplify, simplifyMutableVersion, size, size, validTree, valueOfDouble, valueOfInt |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AlertExpression(Expression arg,
Expression[] optionalArgs)
arg - The message expressionoptionalArgs - Optional expressions (max 4) which are appended to
the message defined in arg.| Method Detail |
public double evaluate(Variables variables,
QuoteBundle quoteBundle,
Symbol symbol,
int day)
throws EvaluationException
variables - The variables of the rulequoteBundle - The quote bundle containing the symbol datasymbol - The implicit symbol of the ruleday - The date offset used to evaluate the rule.
EvaluationException - if the expression performs an illegal
operation such as divide by zero.
public int checkType()
throws TypeMismatchException
TypeMismatchException - if the expression has incorrect typespublic java.lang.String toString()
toString in interface ExpressiontoString in class AbstractExpressionpublic int getType()
Expression.FLOAT_TYPEpublic int getChildCount()
1 and a maximum of 4.
getChildCount in interface ExpressiongetChildCount in class UnaryExpressionThe number of non null arguments.public Expression getChild(int child)
getChild in interface ExpressiongetChild in class AbstractExpressionpublic java.lang.Object clone()
clone in interface Expressionclone in class AbstractExpression
|
Venice 0.751beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||