Class ASTEQNode
java.lang.Object
org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTBinaryOperator
org.apache.velocity.runtime.parser.node.ASTComparisonNode
org.apache.velocity.runtime.parser.node.ASTEQNode
- All Implemented Interfaces:
Cloneable
,Node
,Renderable
- Direct Known Subclasses:
ASTNENode
Handles
arg1 == arg2
This operator requires that the LHS and RHS are both of the
same Class, both numbers or both coerce-able to strings.- Author:
- Will Glass-Husain, Peter Romianowski, Nathan Bubna
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
compareNonNumber
(Object left, Object right) boolean
compareNull
(Object left, Object right) Always false by default, != and == subclasses must override this.get the string representing the mathematical operatorboolean
numberTest
(int compareResult) performs the actual comparisonMethods inherited from class org.apache.velocity.runtime.parser.node.ASTComparisonNode
compareNumbers, evaluate, jjtAccept, value
Methods inherited from class org.apache.velocity.runtime.parser.node.ASTBinaryOperator
init, literal
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
childrenAccept, cleanupParserAndTokens, clone, clone, 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, toString
-
Constructor Details
-
ASTEQNode
public ASTEQNode(int id) -
ASTEQNode
-
-
Method Details
-
compareNull
Description copied from class:ASTComparisonNode
Always false by default, != and == subclasses must override this.- Overrides:
compareNull
in classASTComparisonNode
- Parameters:
left
-right
-- Returns:
- comparison result
-
getLiteralOperator
Description copied from class:ASTComparisonNode
get the string representing the mathematical operator- Specified by:
getLiteralOperator
in classASTComparisonNode
- Returns:
- operator string
-
numberTest
public boolean numberTest(int compareResult) Description copied from class:ASTComparisonNode
performs the actual comparison- Specified by:
numberTest
in classASTComparisonNode
- Parameters:
compareResult
-- Returns:
- comparison result
-
compareNonNumber
- Overrides:
compareNonNumber
in classASTComparisonNode
-