asd_library.tree.bstree
Interface BSTree_adt

All Superinterfaces:
Dictionary_adt
All Known Implementing Classes:
BSTree

public interface BSTree_adt
extends Dictionary_adt

The abstract data type of a Binary Search tree.


Method Summary
 java.lang.Comparable element(BSTNode v)
          Method to get element field.
 boolean isLeaf(BSTNode v)
          Verifies if the node v is a leaf.
 boolean isRoot(BSTNode v)
          Verifies if the node v is the root.
 BSTNode root()
          Returns the root of this tree.
 
Methods inherited from interface asd_library.dictionary.Dictionary_adt
find, insert, remove
 

Method Detail

element

public java.lang.Comparable element(BSTNode v)
Method to get element field.

Parameters:
v - the node.
Returns:
the element field or null if this node is null.

root

public BSTNode root()
Returns the root of this tree.

Returns:
the root node.

isLeaf

public boolean isLeaf(BSTNode v)
Verifies if the node v is a leaf.

Parameters:
v - the node
Returns:
true if v is a leaf, false otherwise.

isRoot

public boolean isRoot(BSTNode v)
Verifies if the node v is the root.

Parameters:
v - the node
Returns:
true if v is the root, false otherwise.