org.maverickdbms.basic.util
Interface Tree

All Known Implementing Classes:
AvlTree

public interface Tree

Tree provides a common interface for various tree implementations


Field Summary
static int TYPE_AVL
           
 
Method Summary
 boolean containsKey(java.lang.Comparable c)
          Return whether the specified object is in the tree.
 boolean isEmpty()
          If the tree contains any items.
 java.util.Iterator iterator()
          Iterator to traverse through tree items
 java.lang.Comparable probe(java.lang.Comparable c)
          Searches for the specified item.
 java.lang.Comparable remove(java.lang.Comparable c)
          Removes the specified item from the tree
 

Field Detail

TYPE_AVL

public static final int TYPE_AVL
See Also:
Constant Field Values
Method Detail

containsKey

public boolean containsKey(java.lang.Comparable c)
Return whether the specified object is in the tree.

Returns:
contains the item

isEmpty

public boolean isEmpty()
If the tree contains any items.

Returns:
is empty

iterator

public java.util.Iterator iterator()
Iterator to traverse through tree items

Returns:
the iterator

probe

public java.lang.Comparable probe(java.lang.Comparable c)
Searches for the specified item. If the item is missing inserts it into the tree

Returns:
the item

remove

public java.lang.Comparable remove(java.lang.Comparable c)
Removes the specified item from the tree

Returns:
the removed item