Interface binaryTree.visitor.IVisitor


public interface IVisitor
extends Object
Represents all extrinsic algorithms on a BiTree as a visitor to the the BiTree host structure. The BiTree host will make the appropriate call on this IVisitor's methods.

Author:
Dung X. Nguyen - Copyright 1999 - All rights reserved.

Method Index

 o nonNullCase (BiTree, Object)
Called by the host when the host is not empty
 o nullCase (BiTree, Object)
Called by the host when the host is empty

Methods

 o nullCase
public abstract Object nullCase(BiTree host, Object input)
Called by the host when the host is empty.

Parameters:
host -
input - the input needed for this IVisitor to perform its task.
 o nonNullCase
public abstract Object nonNullCase(BiTree host, Object input)
Called by the host when the host is not empty.

Parameters:
host -
input - the input needed for this IVisitor to perform its task.