net.datastructures
Interface BTPosition<E>

All Superinterfaces:
Position<E>
All Known Implementing Classes:
BTNode

public interface BTPosition<E>
extends Position<E>

Interface for a node of a binary tree. It maintains an element, a parent node, a left node, and a right node.

Author:
Michael Goodrich

Method Summary
 BTPosition<E> getLeft()
          Returns the left child of this position
 BTPosition<E> getParent()
          Returns the parent of this position
 BTPosition<E> getRight()
          Returns the right child of this position
 void setElement(E o)
          Sets the element stored at this position
 void setLeft(BTPosition<E> v)
          Sets the left child of this position
 void setParent(BTPosition<E> v)
          Sets the parent of this position
 void setRight(BTPosition<E> v)
          Sets the right child of this position
 
Methods inherited from interface net.datastructures.Position
element
 

Method Detail

setElement

void setElement(E o)
Sets the element stored at this position


getLeft

BTPosition<E> getLeft()
Returns the left child of this position


setLeft

void setLeft(BTPosition<E> v)
Sets the left child of this position


getRight

BTPosition<E> getRight()
Returns the right child of this position


setRight

void setRight(BTPosition<E> v)
Sets the right child of this position


getParent

BTPosition<E> getParent()
Returns the parent of this position


setParent

void setParent(BTPosition<E> v)
Sets the parent of this position