|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Encapsulates methods common to the nodes of a tree.
| Field Summary | |
static java.lang.String |
copyright
|
| Method Summary | |
void |
breadthFirstTraversal(Visitor visitor)
Causes a visitor to visit the nodes of this tree in breadth-first traversal order starting from this node. |
void |
depthFirstTraversal(PrePostVisitor visitor)
Causes a visitor to visit the nodes of this tree in depth-first traversal order starting from this node. |
int |
getDegree()
Returns the degree of this tree node. |
int |
getHeight()
Returns the height in the tree of this tree node. |
java.lang.Object |
getKey()
Returns the object contained in this tree node. |
Tree |
getSubtree(int i)
Returns the specified subtree of this tree node. |
boolean |
isEmpty()
Tests if this tree node is empty (i.e., an external node). |
boolean |
isLeaf()
Tests if this tree node is a leaf node. |
| Methods inherited from interface Opus5.Container |
accept, getCount, getEnumeration, isFull, purge |
| Methods inherited from interface Opus5.Comparable |
compare, isEQ, isGE, isGT, isLE, isLT, isNE |
| Field Detail |
public static final java.lang.String copyright
| Method Detail |
public java.lang.Object getKey()
InvalidOperationException - If this is an external node.public Tree getSubtree(int i)
i - The number of the subtree to select.public boolean isEmpty()
isEmpty in interface Containerpublic boolean isLeaf()
public int getDegree()
public int getHeight()
-1.public void depthFirstTraversal(PrePostVisitor visitor)
visitor - The visitor to accept.PrePostVisitorpublic void breadthFirstTraversal(Visitor visitor)
visitor - The visitor to accept.Visitor
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||