public class AVLTree
1: package TreePackage;
3: /**
4: A class that implements the ADT AVL tree by extending BinarySearchTree.
5: The remove operation is not supported.
6:
7: @author Frank M. Carrano
8: @author Timothy M. Henry
9: @version 5.0
10: */
11: public class AVLTree<T extends Comparable<? super T>>
12: extends BinarySearchTree<T>
13: // implements SearchTreeInterface<T> // Optional since BinarySearchTree implements this interface
14: {
15: public AVLTree()
16: {
17: super();
18: } // end default constructor
19:
20: public AVLTree(T rootEntry)
21: {
22: super(rootEntry);
23: } // end constructor
25: /* Implementations of add and remove are here. A definition of add appears in Segment 28.12 of
26: this chapter. Other methods in SearchTreeInterface are inherited.
27: . . .
29: Implementations of private methods to rebalance the tree using rotations are here.
30: . . . */
32: } // end AVLTree