net.datastructures
Interface TreePosition<E>

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

public interface TreePosition<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
 PositionList<Position<E>> getChildren()
          Returns the children of this position
 TreePosition<E> getParent()
          Returns the parent of this position
 void setChildren(PositionList<Position<E>> c)
          Sets the right child of this position
 void setElement(E o)
           
 void setParent(TreePosition<E> v)
          Sets the parent of this position
 
Methods inherited from interface net.datastructures.Position
element
 

Method Detail

setElement

void setElement(E o)

getChildren

PositionList<Position<E>> getChildren()
Returns the children of this position


setChildren

void setChildren(PositionList<Position<E>> c)
Sets the right child of this position


getParent

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


setParent

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