/**
* Node for the parse tree
*
* @author P. Tellenbach
* @version 16. Dec. 2007
*/
public class Node
{
/** Content of the node */
protected String string ;
/** Reference to the left subtree */
protected Node left ;
/** Reference to the right subtree */
protected Node right ;
/**
* Constructs a new node, sets the left
* and the right subtree to null
* @param str the content of the node
*/
public Node( String str )
{
string = str ;
left = null ;
right = null ;
}
/** Getter for the content */
public String getString()
{
return string ;
}
/** Getter for the left subtree */
public Node getLeft()
{
return left ;
}
/** Setter for the left subtree */
public void setLeft( Node n )
{
left = n ;
}
/** Getter for the right subtree */
public Node getRight()
{
return right ;
}
/** Setter for the right subtree */
public void setRight( Node n )
{
right = n ;
}
}