TreeLayout.
The TreeForTreeLayout interface is designed to best match the implemented
layout algorithm and to ensure the algorithm's time complexity promises in
all possible cases. However in most situation a client must not deal with all
details of this interface and can directly use the
org. to implement this
interface or even use the
org. class directly.
| Modifier and Type | Method and Description |
|---|---|
| public Iterable | Returns: the children of the given parentNode, from first to last[!isLeaf(parentNode)] parentNode)Returns the children of a parent node. |
| public Iterable | Returns: the children of given parentNode, from last to first[!isLeaf(parentNode)] parentNode)Returns the children of a parent node, in reverse order. |
| public TreeNode | Returns: the first child of the parentNode[!isLeaf(parentNode)] parentNode)Returns the first child of a parent node. |
| public TreeNode | Returns: the last child of the parentNode[!isLeaf(parentNode)] parentNode)Returns the last child of a parent node. |
| public TreeNode | |
| public boolean | Returns: true iff the node is a child of the given parentNodeTells if a node is a child of a given parentNode. |
| public boolean | Returns: true iff node is a leaf in the tree, i.e. has no children.Tells if a node is a leaf in the tree. |
| getChildren | back to summary |
|---|---|
| public Iterable Returns the children of a parent node. Time Complexity: O(1)
| |
| getChildrenReverse | back to summary |
|---|---|
| public Iterable Returns the children of a parent node, in reverse order. Time Complexity: O(1)
| |
| getFirstChild | back to summary |
|---|---|
| public TreeNode getFirstChild(TreeNode parentNode) Returns the first child of a parent node. Time Complexity: O(1)
| |
| getLastChild | back to summary |
|---|---|
| public TreeNode getLastChild(TreeNode parentNode) Returns the last child of a parent node. Time Complexity: O(1)
| |
| getRoot | back to summary |
|---|---|
| public TreeNode getRoot() Returns the the root of the tree. Time Complexity: O(1)
| |
| isChildOfParent | back to summary |
|---|---|
| public boolean isChildOfParent(TreeNode node, TreeNode parentNode) Tells if a node is a child of a given parentNode. Time Complexity: O(1)
| |
| isLeaf | back to summary |
|---|---|
| public boolean isLeaf(TreeNode node) Tells if a node is a leaf in the tree. Time Complexity: O(1)
| |