Package
Class
Use
Tree
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
B
C
D
E
F
G
H
I
L
N
P
R
S
T
V
B
BinaryTree
<
V
> - Class in
<Unnamed>
A BinaryTree consists of "nodes"--each "node" is itself a BinaryTree.
BinaryTree(V, BinaryTree<V>, BinaryTree<V>)
- Constructor for class
BinaryTree
Constructor for BinaryTree.
BinaryTree(V)
- Constructor for class
BinaryTree
Constructor for a BinaryTree leaf node (that is, with no children).
C
contains(BinaryTree, BinaryTree)
- Static method in class
BinaryTree
Tests whether the
tree
argument contains within itself the
targetNode
argument.
containsEqualValue(V)
- Method in class
BinaryTree
Returns true if and only if some node in this binary tree contains a value that is equal to the parameter.
containsSameValue(V)
- Method in class
BinaryTree
Returns true if and only if some node in this binary tree contains the same object (not just an equal object) as the one given for the value parameter.
copy()
- Method in class
BinaryTree
Returns a new BinaryTree equal to (but not the same as) this binary tree.
D
depth()
- Method in class
BinaryTree
Returns the depth of this binary tree.
E
equals(Object)
- Method in class
BinaryTree
Tests whether this BinaryTree is equal to the given object.
F
fringe()
- Method in class
BinaryTree
Returns a List of the values (of type V) in the leaves of this binary tree, in left-to-right order.
G
getLeftChild()
- Method in class
BinaryTree
Getter method for left child of this BinaryTree node.
getRightChild()
- Method in class
BinaryTree
Getter method for right child of this BinaryTree node.
getValue()
- Method in class
BinaryTree
Getter method for the value in this BinaryTree node.
H
hashCode()
- Method in class
BinaryTree
Computes a hash code for the complete binary tree rooted at this BinaryTree node.
I
isLeaf()
- Method in class
BinaryTree
Tests whether this node is a leaf node.
L
leaves()
- Method in class
BinaryTree
Returns a Set of all the leaves of this binary tree.
leftmostDescendant()
- Method in class
BinaryTree
Returns the leftmost descendant of this binary tree.
N
numberOfNodes()
- Method in class
BinaryTree
Returns the total number of nodes in this binary tree (include the root in the count).
P
print()
- Method in class
BinaryTree
Prints the binary tree rooted at this BinaryTree node.
R
reverse()
- Method in class
BinaryTree
Returns a new binary tree which is the mirror image of the binary tree whose root is at this binary tree.
reverseInPlace()
- Method in class
BinaryTree
Rearranges the binary tree rooted at this binary tree to be the mirror image of its original structure.
rightmostDescendant()
- Method in class
BinaryTree
Returns the rightmost descendant of this binary tree.
S
setLeftChild(BinaryTree<V>)
- Method in class
BinaryTree
Sets the left child of this BinaryTree node to be the given subtree.
setRightChild(BinaryTree<V>)
- Method in class
BinaryTree
Sets the right child of this BinaryTree node to be the given subtree.
setValue(V)
- Method in class
BinaryTree
Sets the value in this BinaryTree node.
T
toString()
- Method in class
BinaryTree
Returns a String representation of this BinaryTree.
V
value
- Variable in class
BinaryTree
The value (data) in this node of the binary tree; may be of any object type.
valuesOf()
- Method in class
BinaryTree
Returns a Set of the values (of type V) in this binary tree.
B
C
D
E
F
G
H
I
L
N
P
R
S
T
V
Package
Class
Use
Tree
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes