common-util

local.tomas.expr
Class BinaryTerm

java.lang.Object
  extended by local.tomas.expr.BinaryTerm
All Implemented Interfaces:
Serializable, Expression
Direct Known Subclasses:
AdditionTerm, AndTerm, ConcatenationTerm, DivisionTerm, EqualityTerm, GreaterEqualTerm, GreaterTerm, InequalityTerm, InTerm, LessEqualTerm, LessTerm, LikeTerm, MatchTerm, MultiplicationTerm, NotInTerm, NotLikeTerm, OrTerm, SubtractionTerm

public abstract class BinaryTerm
extends Object
implements Expression

This class defines a binary term (having two operands) within an expression.

Author:
Teubner
See Also:
Serialized Form

Field Summary
protected  Expression left
          Left operand.
protected  Expression right
          Right operand.
 
Constructor Summary
protected BinaryTerm()
          Default constructor.
protected BinaryTerm(Expression left, Expression right)
          Constructor using fields.
 
Method Summary
 boolean equals(Object obj)
          Compares this object against the specified object.
 Expression getLeft()
          Get left operand.
 Expression getRight()
          Get right operand.
 int hashCode()
           
 void setLeft(Expression left)
          Set left operand.
 void setRight(Expression right)
          Set right operand.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface local.tomas.expr.Expression
greet
 

Field Detail

left

protected Expression left
Left operand.


right

protected Expression right
Right operand.

Constructor Detail

BinaryTerm

protected BinaryTerm()
Default constructor.


BinaryTerm

protected BinaryTerm(Expression left,
                     Expression right)
Constructor using fields.

Parameters:
left - left operand
right - right operand
Method Detail

getLeft

public Expression getLeft()
Get left operand.

Returns:
left operand.

setLeft

public void setLeft(Expression left)
Set left operand.

Parameters:
left - left operand.

getRight

public Expression getRight()
Get right operand.

Returns:
right operand.

setRight

public void setRight(Expression right)
Set right operand.

Parameters:
right - right operand.

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a BinaryTerm object with equal operands and operator as this object.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

common-util

Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.