public class AVLTree
1: package TreePackage;
2:
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 4.0
10: */
11: public class AVLTree<T extends Comparable<? super T>>
12: extends BinarySearchTree<T> implements SearchTreeInterface<T>
13: {
14: public AVLTree()
15: {
16: super();
17: } // end default constructor
18:
19: public AVLTree(T rootEntry)
20: {
21: super(rootEntry);
22: } // end constructor
23:
24: /* < Implementations of add and remove are here. A definition of add appears in
25: Segment 27.12 of this chapter. Other methods in SearchTreeInterface are inherited. >
26: . . .
27:
28: < Implementations of private methods to rebalance the tree using rotations are here. >
29: . . . */
30:
31: } // end AVLTree