public abstract class ASTComparisonNode extends ASTBinaryOperator
| Constructor and Description |
|---|
ASTComparisonNode(int id) |
ASTComparisonNode(Parser p,
int id) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareNonNumber(Object left,
Object right) |
boolean |
compareNull(Object left,
Object right)
Always false by default, != and == subclasses must override this.
|
Boolean |
compareNumbers(Object left,
Object right)
compare numbers
|
boolean |
evaluate(InternalContextAdapter context) |
abstract String |
getLiteralOperator()
get the string representing the mathematical operator
|
Object |
jjtAccept(ParserVisitor visitor,
Object data) |
abstract boolean |
numberTest(int compareResult)
performs the actual comparison
|
Object |
value(InternalContextAdapter context) |
init, literalchildrenAccept, cleanupParserAndTokens, dump, dump, dump, 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 ASTComparisonNode(int id)
id - public ASTComparisonNode(Parser p, int id)
p - id - public Object jjtAccept(ParserVisitor visitor, Object data)
jjtAccept in interface NodejjtAccept in class SimpleNodeSimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor, java.lang.Object)public boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
evaluate in interface Nodeevaluate in class SimpleNodeMethodInvocationExceptionSimpleNode.evaluate(org.apache.velocity.context.InternalContextAdapter)public boolean compareNull(Object left, Object right)
left - right - public Boolean compareNumbers(Object left, Object right)
left - right - public abstract String getLiteralOperator()
getLiteralOperator in class ASTBinaryOperatorpublic abstract boolean numberTest(int compareResult)
compareResult - public Object value(InternalContextAdapter context) throws MethodInvocationException
value in interface Nodevalue in class SimpleNodeMethodInvocationExceptionSimpleNode.value(org.apache.velocity.context.InternalContextAdapter)Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.