org.apache.jdo.jdoql.tree
Interface BinaryExpression

All Superinterfaces:
Expression, Node, java.io.Serializable
All Known Subinterfaces:
AndExpression, ConditionalAndExpression, ConditionalOrExpression, DivideExpression, EqualsExpression, GreaterThanEqualsExpression, GreaterThanExpression, LessThanEqualsExpression, LessThanExpression, MinusExpression, NotEqualsExpression, OrExpression, PlusExpression, TimesExpression
All Known Implementing Classes:
AndExpr, BinaryExpr, ConditionalAndExpr, ConditionalOrExpr, DivideExpr, EqualsExpr, GreaterThanEqualsExpr, GreaterThanExpr, LessThanEqualsExpr, LessThanExpr, MinusExpr, NotEqualsExpr, OrExpr, PlusExpr, TimesExpr

public interface BinaryExpression
extends Expression

This node expression represents a binary operator. All binary operators have exactly two children. Examples of binary operators are AndExpression and EqualsExpression.

Author:
Michael Watzek

Method Summary
 java.lang.Class getCommonOperandType()
          Returns the class instance suiteable for implementing the result of this expression.
 Expression getLeftExpression()
          Returns the first child of this node.
 Expression getRightExpression()
          Returns the second child of this node.
 
Methods inherited from interface org.apache.jdo.jdoql.tree.Node
arrive, getChildren, getJavaClass, getObject, getParent, getTokenType, leave, setObject, setParent, walkNextChild
 

Method Detail

getLeftExpression

Expression getLeftExpression()
Returns the first child of this node.

Returns:
the first child

getRightExpression

Expression getRightExpression()
Returns the second child of this node.

Returns:
the second child

getCommonOperandType

java.lang.Class getCommonOperandType()
Returns the class instance suiteable for implementing the result of this expression. In case of integral binary expressions that class instance is also the result type of the operation retrieved by method getJavaClass. In case of relational binary expressions, that class instance differs from the type retrieved by getJavaClass, because relational binary expressions have a boolean result type which does not depend of the operand types.

Returns:
the common operand type


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.