|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Please refer to the documentation of the BinaryTree
interface.
BinaryTree
Method Summary | |
Position |
leftChild(Position node)
Provides the left child of a given node. |
Position |
rightChild(Position node)
Provides the right child of a given node. |
Position |
sibling(Position node)
Provides the sibling of a given node (the other child of the node's parent) |
Methods inherited from interface jdsl.core.api.InspectableTree |
childAtRank, children, firstChild, isExternal, isInternal, isRoot, lastChild, numChildren, parent, rankOfChild, root, siblingAfter, siblingBefore, siblings |
Methods inherited from interface jdsl.core.api.InspectablePositionalContainer |
positions |
Methods inherited from interface jdsl.core.api.InspectableContainer |
contains, elements, isEmpty, size |
Method Detail |
public Position leftChild(Position node) throws BoundaryViolationException, InvalidAccessorException
node
- Any internal node of the tree
node
BoundaryViolationException
- if node
is
external
InvalidAccessorException
- if node
is null
or does not belong to this binary tree.public Position rightChild(Position node) throws BoundaryViolationException, InvalidAccessorException
node
- Any internal node of the tree
node
BoundaryViolationException
- if node
is
external
InvalidAccessorException
- if node
is null
or does not belong to this binary tree.public Position sibling(Position node) throws InvalidAccessorException, BoundaryViolationException
node
- a node of the binary tree.
node
.
BoundaryViolationException
- if node
is the
root
InvalidAccessorException
- if node
is null
or does not belong to this binary tree.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |