|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Tree.Node
protected static class Tree.Node
A red/black tree node. This class is used only within the Tree class.
This class represents a data structure used by the Tree class. The methods of this class are not synchronized; synchronization is the responsibility of the Tree class. The data members are not private; they are "package" private so that they can be manipularted by the Tree class (and related classes, like Crawler). The Node class is not an "inner" class of Tree due to the requirement to make a static final (i.e. constant) NIL node.
Field Summary | |
---|---|
protected Comparable |
key
The key of the node. |
protected Tree.Node |
left
The left child of this node. |
protected static Tree.Node |
NIL
NIL is the sentinal Node that is used instead of null, simplifying the implementation of the red/black tree. |
protected Tree.Node |
parent
The parent of this node. |
protected boolean |
red
The color (red or black) of this node. |
protected Tree.Node |
right
The right child of this node. |
protected Object |
value
The value associated with the key. |
Constructor Summary | |
---|---|
Tree.Node()
Default constructor. |
Method Summary | |
---|---|
Object |
clone()
Make a shallow copy of the node and its sub-nodes. |
boolean |
equals(Object obj)
Test for node equality. |
protected int |
getDepth()
Determine the 2-3-4 node depth of this node (i.e. |
protected boolean |
isLeaf()
Determine if this node is a part of a 2-3-4 leaf node (i.e. |
protected void |
print()
In-order printing of the contents of the node and its children. |
String |
toString()
Provide a string representation of this node's value. |
Field Detail |
---|
protected static final Tree.Node NIL
protected Comparable key
protected Object value
protected Tree.Node parent
protected Tree.Node left
protected Tree.Node right
protected boolean red
Constructor Detail |
---|
public Tree.Node()
Method Detail |
---|
public String toString()
public boolean equals(Object obj)
public Object clone()
protected boolean isLeaf()
protected int getDepth()
protected void print()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |