org.apache.accumulo.core.util
Class BinaryTree<T>
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BinaryTree
public BinaryTree()
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.