com.futureshocked.datastructures
Class BinaryNode

java.lang.Object
  extended by com.futureshocked.datastructures.BinaryNode

public class BinaryNode
extends java.lang.Object

Simple node class to be used by BinaryTree.


Field Summary
private  int data
          The value of this node.
private  BinaryNode leftNode
          The left and right child nodes.
private  BinaryNode rightNode
          The left and right child nodes.
 
Constructor Summary
BinaryNode(int data)
          Simple constructor for BinaryNode.
 
Method Summary
 int getData()
           
 BinaryNode getLeftNode()
           
 BinaryNode getRightNode()
           
 void setData(int data)
           
 void setLeftNode(BinaryNode leftNode)
           
 void setRightNode(BinaryNode rightNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private int data
The value of this node.


leftNode

private BinaryNode leftNode
The left and right child nodes.


rightNode

private BinaryNode rightNode
The left and right child nodes.

Constructor Detail

BinaryNode

public BinaryNode(int data)
Simple constructor for BinaryNode.

Parameters:
data - The value of this node.
Method Detail

getData

public int getData()

setData

public void setData(int data)

getLeftNode

public BinaryNode getLeftNode()

setLeftNode

public void setLeftNode(BinaryNode leftNode)

getRightNode

public BinaryNode getRightNode()

setRightNode

public void setRightNode(BinaryNode rightNode)