|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectAVL.Node<Key,Data>
public class Node<Key,Data>
The node of an AVL Tree.
| Field Summary | |
|---|---|
int |
bf
The node's balanceFactor. |
Data |
data
The the data stored in the node. |
Key |
key
The key of the data stored in the node. |
Node<Key,Data> |
left
The node's left child. |
Node<Key,Data> |
parent
The node's parent. |
Node<Key,Data> |
right
The node's right child. |
| Constructor Summary | |
|---|---|
Node(Key key,
Data data)
Node constructot. |
|
| Method Summary | |
|---|---|
java.lang.String |
toString()
Returns the node as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Data data
public Key key
public Node<Key,Data> parent
public int bf
public Node<Key,Data> left
public Node<Key,Data> right
| Constructor Detail |
|---|
public Node(Key key,
Data data)
null. The balance factor is set to 0.
key - Key of the new node.data - Data to save in the node.| Method Detail |
|---|
public java.lang.String toString()
String. The key, data and
balance factor are printed.
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||