beowulf.model.tree
Interface BinaryTreeModel

All Superinterfaces:
TreeModel
All Known Subinterfaces:
BSTModel
All Known Implementing Classes:
AbstractBinaryTreeModel, DefaultBST

public interface BinaryTreeModel
extends TreeModel

Version:
1.0, 11/15/2003
Author:
Andy Scukanec (ags at cs dot cornell dot edu)

Method Summary
 Enumeration elements()
          This will return an enumeration of all values in the tree.
 int getMaxDepth()
          Returns the maximum depth of the tree.
 int getNodeCount()
          Returns the number of nodes in the tree.
 String toString(boolean verbose)
          Returns a verbose description if passed in true.
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Method Detail

elements

public Enumeration elements()
This will return an enumeration of all values in the tree.

Returns:
An enumeration of all the elements in the tree.

getNodeCount

public int getNodeCount()
Returns the number of nodes in the tree.

Returns:
The number of nodes in the tree.

getMaxDepth

public int getMaxDepth()
Returns the maximum depth of the tree.

Returns:
The maximum depth of the tree.

toString

public String toString(boolean verbose)
Returns a verbose description if passed in true. Returns a shorter description otherwise.

Parameters:
verbose - Whether or not to return a verbose description.
Returns:
A description like toString(), but possibly more verbose.