com.lucidera.opt
Class LoptJoinTree.BinaryTree

java.lang.Object
  extended by com.lucidera.opt.LoptJoinTree.BinaryTree
Enclosing class:
LoptJoinTree

protected class LoptJoinTree.BinaryTree
extends Object

Simple binary tree class that stores an id in the leaf nodes and keeps track of the parent LoptJoinTree object associated with the binary tree.


Field Summary
private  int id
           
private  LoptJoinTree.BinaryTree left
           
private  LoptJoinTree parent
           
private  LoptJoinTree.BinaryTree right
           
 
Constructor Summary
LoptJoinTree.BinaryTree(int rootId, LoptJoinTree parent)
           
LoptJoinTree.BinaryTree(LoptJoinTree.BinaryTree left, LoptJoinTree.BinaryTree right, LoptJoinTree parent)
           
 
Method Summary
 int getId()
           
 LoptJoinTree.BinaryTree getLeft()
           
 LoptJoinTree getParent()
           
 LoptJoinTree.BinaryTree getRight()
           
 void getTreeOrder(List<Integer> treeOrder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private int id

left

private LoptJoinTree.BinaryTree left

right

private LoptJoinTree.BinaryTree right

parent

private LoptJoinTree parent
Constructor Detail

LoptJoinTree.BinaryTree

public LoptJoinTree.BinaryTree(int rootId,
                               LoptJoinTree parent)

LoptJoinTree.BinaryTree

public LoptJoinTree.BinaryTree(LoptJoinTree.BinaryTree left,
                               LoptJoinTree.BinaryTree right,
                               LoptJoinTree parent)
Method Detail

getLeft

public LoptJoinTree.BinaryTree getLeft()

getRight

public LoptJoinTree.BinaryTree getRight()

getParent

public LoptJoinTree getParent()

getId

public int getId()
Returns:
the id associated with a leaf node in a binary tree

getTreeOrder

public void getTreeOrder(List<Integer> treeOrder)