package binaryTree.visitor; import binaryTree.BiTree; /** * 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. * @dependency binaryTree.BiTree * @dependency binaryTree.BiTree */ public abstract interface IVisitor { /** * Called by the host when the host is empty. * @param host * @param input the input needed for this IVisitor to perform its task. */ public abstract Object nullCase(BiTree host, Object input); /** * Called by the host when the host is not empty. * @param host * @param input the input needed for this IVisitor to perform its task. */ public abstract Object nonNullCase(BiTree host, Object input); }