public class ASTAddNode extends ASTMathNode
strictMode| Constructor and Description |
|---|
ASTAddNode(int id) |
ASTAddNode(Parser p,
int id) |
| Modifier and Type | Method and Description |
|---|---|
String |
getLiteralOperator()
get the string representing the mathematical operator
|
protected Object |
handleSpecial(Object left,
Object right,
InternalContextAdapter context)
Extension hook to allow special behavior by subclasses
If this method returns a non-null value, that is returned,
rather than the result of the math operation.
|
Number |
perform(Number left,
Number right,
InternalContextAdapter context)
Performs the math operation represented by this node.
|
init, jjtAccept, valueliteralchildrenAccept, cleanupParserAndTokens, dump, dump, dump, evaluate, execute, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toStringpublic ASTAddNode(int id)
id - public ASTAddNode(Parser p, int id)
p - id - protected Object handleSpecial(Object left, Object right, InternalContextAdapter context)
ASTMathNodehandleSpecial in class ASTMathNodehandleSpecial(java.lang.Object, java.lang.Object, org.apache.velocity.context.InternalContextAdapter)public String getLiteralOperator()
ASTBinaryOperatorgetLiteralOperator in class ASTBinaryOperatorpublic Number perform(Number left, Number right, InternalContextAdapter context)
ASTMathNodeperform in class ASTMathNodeperform(Number, Number, InternalContextAdapter)Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.