kites.TRSModel
Class Rule

java.lang.Object
  extended by kites.TRSModel.Rule

public class Rule
extends java.lang.Object

This class represents a single rule of a ruleset. It takes two trees, the left-hand side of the rule and the right-hand side.


Field Summary
private  ASTNode left
          The left-hand side of the rule
private  ASTNode right
          The right-hand side of the rule
 
Constructor Summary
Rule()
           
 
Method Summary
 ASTNode getLeft()
          Gives the left-hand side of the rule.
 ASTNode getRight()
          Gives the right-hand side of the rule.
 void setLeft(ASTNode left)
          Set the left-hand side of the rule
 void setRight(ASTNode right)
          Set the right-hand side of the rule
 java.lang.String toString()
          Gives the String representation of the rule in the form "left" --> "right".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

left

private ASTNode left
The left-hand side of the rule


right

private ASTNode right
The right-hand side of the rule

Constructor Detail

Rule

public Rule()
Method Detail

getLeft

public ASTNode getLeft()
Gives the left-hand side of the rule.

Returns:
The rule's left-hand side

getRight

public ASTNode getRight()
Gives the right-hand side of the rule.

Returns:
The rule's right-hand side

setLeft

public void setLeft(ASTNode left)
Set the left-hand side of the rule

Parameters:
left - The new left-hand side of the rule

setRight

public void setRight(ASTNode right)
Set the right-hand side of the rule

Parameters:
right - The new right-hand side of the rule

toString

public java.lang.String toString()
Gives the String representation of the rule in the form "left" --> "right".

Overrides:
toString in class java.lang.Object
Returns:
The rule's String representation