beowulf.model.tree
Class DefaultBST

java.lang.Object
  extended bybeowulf.model.tree.AbstractBinaryTreeModel
      extended bybeowulf.model.tree.DefaultBinaryTree
          extended bybeowulf.model.tree.DefaultBST
All Implemented Interfaces:
BinaryTreeModel, BSTModel, TreeModel

public class DefaultBST
extends DefaultBinaryTree
implements BSTModel

Version:
Version 1.0, Nov. 17, 2003
Author:
Andy Scukanec (ags at cs dot cornell dot edu)

Field Summary
 
Fields inherited from class beowulf.model.tree.DefaultBinaryTree
count, maxDepth, recalcMaxDepth, root
 
Fields inherited from class beowulf.model.tree.AbstractBinaryTreeModel
listenerList
 
Constructor Summary
DefaultBST()
           
 
Method Summary
 Enumeration getInOrderElements()
          This will return an in-order enumeration of all values in the tree.
 Enumeration getPostOrderElements()
          This will return an post-order enumeration of all values in the tree.
 Enumeration getPreOrderElements()
          This will return an pre-order enumeration of all values in the tree.
 void removeBST(Object value)
           
 
Methods inherited from class beowulf.model.tree.DefaultBinaryTree
add, elements, getChild, getChildCount, getIndexOfChild, getMaxDepth, getNodeCount, getPathToNode, getRoot, isLeaf, recalcMaxDepth, remove, toString, valueForPathChanged
 
Methods inherited from class beowulf.model.tree.AbstractBinaryTreeModel
addTreeModelListener, fireNodesChanged, fireNodesInserted, fireNodesRemoved, fireStructureChanged, getListeners, getTreeListeners, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface beowulf.model.tree.BinaryTreeModel
elements, getMaxDepth, getNodeCount, toString
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Constructor Detail

DefaultBST

public DefaultBST()
Method Detail

getInOrderElements

public Enumeration getInOrderElements()
Description copied from interface: BSTModel
This will return an in-order enumeration of all values in the tree.

Specified by:
getInOrderElements in interface BSTModel
Returns:
An in-order enumeration of all the elements in the tree.

getPreOrderElements

public Enumeration getPreOrderElements()
Description copied from interface: BSTModel
This will return an pre-order enumeration of all values in the tree.

Specified by:
getPreOrderElements in interface BSTModel
Returns:
A pre-order enumeration of all the elements in the tree.

getPostOrderElements

public Enumeration getPostOrderElements()
Description copied from interface: BSTModel
This will return an post-order enumeration of all values in the tree.

Specified by:
getPostOrderElements in interface BSTModel
Returns:
An post-order enumeration of all the elements in the tree.

removeBST

public void removeBST(Object value)