Classes | |
class | BinarySearchNode |
Public Member Functions | |
boolean | add (Comparable obj) |
boolean | delete (Comparable obj) |
Comparable | search (Comparable obj) |
Protected Member Functions | |
boolean | addRecursive (BinarySearchNode node, Comparable obj) |
void | deleteNode (BinarySearchNode parent, BinarySearchNode nodeToDelete) |
boolean | deleteRecursive (BinarySearchNode parent, BinarySearchNode node, Comparable obj) |
boolean | invariant () |
boolean | invariantRecursive (BinarySearchNode node) |
Comparable | searchRecursive (BinarySearchNode node, Comparable obj) |
Protected Attributes | |
BinarySearchNode | root |
Definition at line 28 of file BinarySearchTree.java.
boolean utils.BinarySearchTree.add | ( | Comparable | obj | ) | [inline] |
Add a new object to the tree.
Returns true
iff obj has not yet been in the tree. A return value of false
indicates that the tree remains unchanged.
Definition at line 66 of file BinarySearchTree.java.
boolean utils.BinarySearchTree.addRecursive | ( | BinarySearchNode | node, |
Comparable | obj | ||
) | [inline, protected] |
Definition at line 85 of file BinarySearchTree.java.
boolean utils.BinarySearchTree.delete | ( | Comparable | obj | ) | [inline] |
Definition at line 145 of file BinarySearchTree.java.
void utils.BinarySearchTree.deleteNode | ( | BinarySearchNode | parent, |
BinarySearchNode | nodeToDelete | ||
) | [inline, protected] |
Definition at line 197 of file BinarySearchTree.java.
boolean utils.BinarySearchTree.deleteRecursive | ( | BinarySearchNode | parent, |
BinarySearchNode | node, | ||
Comparable | obj | ||
) | [inline, protected] |
Definition at line 175 of file BinarySearchTree.java.
boolean utils.BinarySearchTree.invariant | ( | ) | [inline, protected] |
Definition at line 235 of file BinarySearchTree.java.
boolean utils.BinarySearchTree.invariantRecursive | ( | BinarySearchNode | node | ) | [inline, protected] |
Definition at line 239 of file BinarySearchTree.java.
Comparable utils.BinarySearchTree.search | ( | Comparable | obj | ) | [inline] |
Definition at line 119 of file BinarySearchTree.java.
Comparable utils.BinarySearchTree.searchRecursive | ( | BinarySearchNode | node, |
Comparable | obj | ||
) | [inline, protected] |
Definition at line 123 of file BinarySearchTree.java.
BinarySearchNode utils.BinarySearchTree.root [protected] |
Definition at line 30 of file BinarySearchTree.java.