public class Node
extends java.lang.Object
Constructor and Description |
---|
Node(java.lang.String name)
Builds a new Node object
|
Modifier and Type | Method and Description |
---|---|
void |
display()
Displays the State object stored in the current node.
|
java.lang.String |
getName()
Gets the name of the State object stored in the node.
|
Node |
goLeft()
Goes to the left child of the current node
|
Node |
goRight()
Goes to the right child of the current node
|
void |
setLeftChild(Node n)
Sets a node as the left child of the current node
|
void |
setRightChild(Node n)
Sets a node as the right child of the current node
|
public Node(java.lang.String name)
name
- the state name of the nodepublic java.lang.String getName()
public Node goLeft()
public Node goRight()
public void setLeftChild(Node n)
n
- the node that will be the left childpublic void setRightChild(Node n)
n
- the node that will be the right childpublic void display()