edu.princeton.cs.algs4.growingtree.interfaces
Interface ISearchingNode<P extends NodeProperties>
- Type Parameters:
P -
- All Superinterfaces:
- java.lang.Comparable<INode<P>>, IAlgorithmNode<P>, INode<P>
- All Known Implementing Classes:
- ShadowNode
public interface ISearchingNode<P extends NodeProperties>
- extends IAlgorithmNode<P>
This interface is for use by an ISearchOperator to traverse the tree
to find the node being sought. Some functions from IAlgorithmNode are
redeclared here with return type ISearchingNode so as to avoid the
need to cast in client code.
- Author:
- Josh Israel
- See Also:
ISearchOperator
| Methods inherited from interface java.lang.Comparable |
compareTo |
getLeft
ISearchingNode<P> getLeft()
- Specified by:
getLeft in interface IAlgorithmNode<P extends NodeProperties>
getRight
ISearchingNode<P> getRight()
- Specified by:
getRight in interface IAlgorithmNode<P extends NodeProperties>
getParent
ISearchingNode<P> getParent()
- Specified by:
getParent in interface IAlgorithmNode<P extends NodeProperties>
markFound
void markFound()
- This must be called on the node being sought in order to trigger the search
animation.