org.apache.velocity.runtime.parser.node
Class ASTEQNode
- Node
Handles the equivalence operator
==
This operator requires that the LHS and RHS are both of the
same Class.
$Id: ASTEQNode.java,v 1.9.4.1 2004/03/03 23:22:58 geirm Exp $
childrenAccept , dump , evaluate , execute , getColumn , getFirstToken , getInfo , getLastToken , getLine , getType , init , isInvalid , jjtAccept , jjtAddChild , jjtClose , jjtGetChild , jjtGetNumChildren , jjtGetParent , jjtOpen , jjtSetParent , literal , render , setFirstToken , setInfo , setInvalid , toString , value |
ASTEQNode
public ASTEQNode(int id)
ASTEQNode
public ASTEQNode(Parser p,
int id)
evaluate
public boolean evaluate(InternalContextAdapter context)
throws MethodInvocationException
Calculates the value of the logical expression
arg1 == arg2
All class types are supported. Uses equals() to
determine equivalence. This should work as we represent
with the types we already support, and anything else that
implements equals() to mean more than identical references.
- evaluate in interface Node
- evaluate in interface SimpleNode
context
- internal context used to evaluate the LHS and RHS
- true if equivalent, false if not equivalent,
false if not compatible arguments, or false
if either LHS or RHS is null
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.