Interface brs.IVisitor


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

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

Method Index

 o emptyCase (BiTree, Object[])
Called by the host when the host is empty
 o nonEmptyCase (BiTree, Object[])
Called by the host when the host is not empty

Methods

 o emptyCase
public abstract Object emptyCase(BiTree host, Object[] inp)
Called by the host when the host is empty.

Parameters:
host - an empty BiTree on which this IVisitor operates.
inp - the input needed by this IVisitor to perform its task.
Returns:
Object the output of this algorithm on the host.
 o nonEmptyCase
public abstract Object nonEmptyCase(BiTree host, Object[] inp)
Called by the host when the host is not empty.

Parameters:
host - a non-empty BiTree on which this IVisitor operates.
inp - the input needed by this IVisitor to perform its task.
Returns:
Object the output of this algorithm on the host.