T
- public class AvlTree<T extends java.lang.Comparable<T>>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
AvlTree.Itr |
Modifier and Type | Field and Description |
---|---|
private Node<T> |
current |
private Node<T> |
next |
private Node<T> |
root |
Constructor and Description |
---|
AvlTree() |
Modifier and Type | Method and Description |
---|---|
private int |
balanceNumber(Node<T> node) |
void |
createList(java.lang.String type)
Creates a list inside the tree.
|
private int |
depth(Node<T> node) |
T |
find(T data)
Finds the element itself.
|
Node<T> |
findNode(T data) |
T |
getMaximum() |
T |
getMinimum() |
Node<T> |
getMinimumNode() |
(package private) Node<T> |
getRoot() |
private Node<T> |
insert(Node<T> node,
T data) |
void |
insert(T data) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator(byte process) |
void |
printTree() |
private Node<T> |
rotateLeft(Node<T> node) |
private Node<T> |
rotateRight(Node<T> node) |
boolean |
search(T data) |
java.lang.String |
toString() |
public T getMaximum()
public T getMinimum()
public void insert(T data)
public boolean search(T data)
public T find(T data)
data
- public java.lang.String toString()
toString
in class java.lang.Object
public void printTree()
public void createList(java.lang.String type)
type
- it is used just to decide the actual class to be usedpublic boolean isEmpty()
public java.util.Iterator<T> iterator(byte process)