org.apache.accumulo.core.util
Class BinaryTree<T>

java.lang.Object
  extended by org.apache.accumulo.core.util.BinaryTree<T>

public class BinaryTree<T>
extends java.lang.Object

A class for storing data as a binary tree. This class does not implement Collection as several methods such as add are not appropriate. A tree is represented as a node with a parent, a left child, and a right child. If the parent is null, this node represents the root of the tree. A node has contents of type T.


Constructor Summary
BinaryTree()
           
 
Method Summary
 T getContents()
           
 BinaryTree<T> getLeft()
           
 BinaryTree<T> getParent()
           
 BinaryTree<T> getRight()
           
 boolean isEmpty()
           
 void setContents(T contents)
           
 void setLeft(BinaryTree<T> left)
           
 void setParent(BinaryTree<T> parent)
           
 void setRight(BinaryTree<T> right)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryTree

public BinaryTree()
Method Detail

getLeft

public BinaryTree<T> getLeft()

setLeft

public void setLeft(BinaryTree<T> left)

getParent

public BinaryTree<T> getParent()

setParent

public void setParent(BinaryTree<T> parent)

getRight

public BinaryTree<T> getRight()

setRight

public void setRight(BinaryTree<T> right)

getContents

public T getContents()

setContents

public void setContents(T contents)

isEmpty

public boolean isEmpty()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.