|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.BinarySearchTree.Node | +--com.mhhe.clrs2e.RedBlackTree.Node
Inner class for a red-black tree node. Extends a binary search tree node with an additional color field.
Field Summary | |
protected java.awt.Color |
color
The node's color, either RED or BLACK. |
Fields inherited from class com.mhhe.clrs2e.BinarySearchTree.Node |
data, left, parent, right |
Constructor Summary | |
RedBlackTree.Node(java.lang.Comparable data)
Initializes a node with the data, makes other pointers nil, and makes the node red. |
Method Summary | |
java.lang.String |
toString()
Returns the data instance variable of this
node and this node's color as a String . |
Methods inherited from class com.mhhe.clrs2e.BinarySearchTree.Node |
compareTo, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.Color color
Constructor Detail |
public RedBlackTree.Node(java.lang.Comparable data)
data
- Data to save in the node.Method Detail |
public java.lang.String toString()
data
instance variable of this
node and this node's color as a String
.
toString
in class BinarySearchTree.Node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |