package schemeFactory; /** * Represents an algorithm on the AList host. * Visitor pattern. */ public interface IListAlgo { /** * Perform an operation on the EmptyList host. * @param host an EmptyList * @param inp input needed by this method to perform the operation. * @return output Object of the operation to be performed. */ public abstract Object emptyCase(AList host, Object inp); /** * Perform an operation on the NEList host. * @param host an NEList * @param inp input needed by this method to perform the operation. * @return output Object of the operation to be performed. */ public abstract Object nonEmptyCase(AList host, Object inp); }