|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_tuebingen.sfb.lichtenstein.binarytrees.BinaryTree.BinaryNode
public static class BinaryTree.BinaryNode
A node in a binary tree. There is no need to differentiate between terminal nodes and non-terminal nodes: daughters can be null.
Constructor Summary | |
---|---|
BinaryTree.BinaryNode(List<String> labels,
BinaryTree.BinaryNode first,
BinaryTree.BinaryNode second)
Initialize a new BinaryNode with the given first and second daughter. |
Method Summary | |
---|---|
BinaryTree.BinaryNode |
getFirstDaughter()
Returns the first daughter. |
List<String> |
getLabels()
Returns the labels. |
BinaryTree.BinaryNode |
getSecondDaughter()
Returns the second daughter. |
String |
toString()
Get a string representation of this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BinaryTree.BinaryNode(List<String> labels, BinaryTree.BinaryNode first, BinaryTree.BinaryNode second)
labels
- The labels of this leaf.first
- The first daughter.second
- The second daughter.Method Detail |
---|
public BinaryTree.BinaryNode getFirstDaughter()
public BinaryTree.BinaryNode getSecondDaughter()
public List<String> getLabels()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |