org.maverickdbms.basic.util
Class AvlTree

java.lang.Object
  extended byorg.maverickdbms.basic.util.AvlTree
All Implemented Interfaces:
Tree

public class AvlTree
extends java.lang.Object
implements Tree


Field Summary
 
Fields inherited from interface org.maverickdbms.basic.util.Tree
TYPE_AVL
 
Constructor Summary
AvlTree()
           
 
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
static void main(java.lang.String[] args)
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvlTree

public AvlTree()
Method Detail

containsKey

public boolean containsKey(java.lang.Comparable c)
Description copied from interface: Tree
Return whether the specified object is in the tree.

Specified by:
containsKey in interface Tree
Returns:
contains the item

isEmpty

public boolean isEmpty()
Description copied from interface: Tree
If the tree contains any items.

Specified by:
isEmpty in interface Tree
Returns:
is empty

iterator

public java.util.Iterator iterator()
Description copied from interface: Tree
Iterator to traverse through tree items

Specified by:
iterator in interface Tree
Returns:
the iterator

probe

public java.lang.Comparable probe(java.lang.Comparable c)
Description copied from interface: Tree
Searches for the specified item. If the item is missing inserts it into the tree

Specified by:
probe in interface Tree
Returns:
the item

remove

public java.lang.Comparable remove(java.lang.Comparable c)
Description copied from interface: Tree
Removes the specified item from the tree

Specified by:
remove in interface Tree
Returns:
the removed item

main

public static void main(java.lang.String[] args)