edu.princeton.cs.algs4.growingtree.interfaces
Interface ISearchOperator<P extends NodeProperties>

Type Parameters:
P -
All Known Implementing Classes:
BSTSearch, SplayOperators.SplaySearch

public interface ISearchOperator<P extends NodeProperties>

This must be implemented by classes in order to define a search operator.

Author:
Josh Israel

Method Summary
 INode<P> doSearch(ISearchingNode<P> root, java.lang.Comparable<INode<P>> keyCompare)
           
 

Method Detail

doSearch

INode<P> doSearch(ISearchingNode<P> root,
                  java.lang.Comparable<INode<P>> keyCompare)
Parameters:
root - The root of the tree
keyCompare - Comparable representing the key being sought
Returns:
The node being sought