package binaryTree; /** * 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 uses */ 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 emptyCase(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 nonEmptyCase(BiTree host, Object input); }