package OOscheme; /** * Serves as a host for an algorithm on a list to visit its internal structure. * Has a "hook" method to call on the appropriate method of the visitor, making * the immutable list structure a framework. * @author Dung X. Nguyen * @author Stephen B. Wong * @since Copyright 2005 - DXN, SBW All rights reserved */ public interface IList { /** * A visitor pattern "hook" method that executes an IListAlgo. * @param algo the visitor, the algorithm to be executed. * @param inp a variable number of input parameters to be used * by the algorithm algo. * @return an Object output from executing the algorithm algo; * may be null. */ public abstract Object execute(IListAlgo algo, Object... inp); }