Pandora.LogicParser.Formula.AExp
Class AExp

java.lang.Object
  extended by Pandora.LogicParser.Formula.Term
      extended by Pandora.LogicParser.Formula.AExp.AExp
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Add, Multiply, Subtract

public abstract class AExp
extends Term

Abstract class for arithmetic expressions.

See Also:
Serialized Form

Field Summary
 Term left
           
 Term right
           
 
Constructor Summary
AExp()
           
 
Method Summary
 void addToSignature(PanSignature signature)
          This method adds this Term to the passed PanSignature IF it is not already in the signature.
 java.lang.String clashes(PanSignature signature)
          Returns a String of error message if this Term clashes with the passed PanSignature.
A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables.
If this Term does not clash with the Signature, it is added to the signature and an empty String is returned.
 Term clone()
          Returns a copy(clone) of this Term.
abstract  java.lang.String display()
          Returns a String to display the AExp.
 Term getLeft()
          Returns the left hand side of the arithmetic expression.
 java.lang.String getName()
          Returns the name of the expression.
 Term getRight()
          Returns the right hand side of the arithmetic expression.
 boolean isIn(PanSignature signature)
          Returns true if this Term is in the passed PanSignature.
 void setVars(Var v)
          This method adds Var v to the list of variables this Term is bound to.
 
Methods inherited from class Pandora.LogicParser.Formula.Term
concatNoDup, equals, getVars, isIn, isInVars, sub
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

public Term left

right

public Term right
Constructor Detail

AExp

public AExp()
Method Detail

display

public abstract java.lang.String display()
Returns a String to display the AExp.

Specified by:
display in class Term

getName

public java.lang.String getName()
Returns the name of the expression.

Specified by:
getName in class Term

isIn

public boolean isIn(PanSignature signature)
Returns true if this Term is in the passed PanSignature.

Specified by:
isIn in class Term
Parameters:
signature - PanSignature represents the signature it is to be searched in.

clashes

public java.lang.String clashes(PanSignature signature)
Returns a String of error message if this Term clashes with the passed PanSignature.
A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables.
If this Term does not clash with the Signature, it is added to the signature and an empty String is returned.

Specified by:
clashes in class Term
Parameters:
signature - PanSignature Represents the signature to be compared against.

clone

public Term clone()
Returns a copy(clone) of this Term.

Specified by:
clone in class Term

getLeft

public Term getLeft()
Returns the left hand side of the arithmetic expression.


getRight

public Term getRight()
Returns the right hand side of the arithmetic expression.


addToSignature

public void addToSignature(PanSignature signature)
This method adds this Term to the passed PanSignature IF it is not already in the signature.

Specified by:
addToSignature in class Term
Parameters:
signature - PanSignature represents the signature to add this Formula to.

setVars

public void setVars(Var v)
This method adds Var v to the list of variables this Term is bound to.

Specified by:
setVars in class Term
Parameters:
v - Var represents the Var to be added to the list of this Term's variables.