Interface BinarySearchTreeSearchCriteria<E extends Comparable<E>>
- Type Parameters:
E- the comparable type
public interface BinarySearchTreeSearchCriteria<E extends Comparable<E>>Represents criteria for performing a binary search on a
BinarySearchTree.search(BinarySearchTreeSearchCriteria)method performs a binary search and requires some criteria to determine whether to traverse to the left (smaller) or right (larger) child.
evaluate(Comparable)method is called for each node visited starting at the root of the tree.
- William Bittle
int evaluate(E comparable)Evaluates the current comparable determining which child to navigate to next.
- Return zero to stop the search.
- Return less than zero to continue searching to the left.
- Return greater than zero to continue searching to the right
comparable- the current comparable