Modifier and Type | Method and Description |
---|---|
BinaryTree<E> |
OrderedTree.binarize()
Converts this ordered tree to a binary tree.
|
BinaryTree<E> |
BinaryTree.find(E element)
Finds a node of the first occurrence of the given element in this tree.
|
BinaryTree<E> |
BinaryTree.findChild(E element)
Finds a child of the first occurrence of the given element in this node.
|
BinaryTree<E> |
BinaryTree.getChildAt(int index)
Returns the child of this node at the given index.
|
BinaryTree<E> |
BinaryTree.getDeepestLeftLeaf()
Returns the deepest left leaf node of this tree.
|
BinaryTree<E> |
BinaryTree.getDeepestRightLeaf()
Returns the deepest right leaf node of this tree.
|
BinaryTree<E> |
BinaryTree.getLeftChild()
Returns the left child of this node.
|
BinaryTree<E> |
BinaryTree.getParent()
Returns the parent of this node.
|
BinaryTree<E> |
BinaryTree.getRightChild()
Returns the right child of this node.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<BinaryTree<E>> |
BinaryTree.getBinaryTreeNodes()
Returns a list of all nodes of the type
BinaryTree<E> in this tree. |
Modifier and Type | Method and Description |
---|---|
void |
BinaryTree.add(BinaryTree<E> child)
Adds the given child to this node.
|
void |
BinaryTree.addChild(BinaryTree<E> child)
Adds the given child to this node.
|
boolean |
BinaryTree.hasLeftChild(BinaryTree<E> child)
Returns
true if this node has the given left child. |
boolean |
BinaryTree.hasRightChild(BinaryTree<E> child)
Returns
true if this node has the given right child. |
void |
BinaryTree.setLeftChild(BinaryTree<E> child)
Sets the given left child to this node.
|
void |
BinaryTree.setParent(BinaryTree<E> parent)
Sets the given parent to this node.
|
void |
BinaryTree.setRightChild(BinaryTree<E> child)
Sets the given right child to this node.
|