IListAlgo.java
Created with JBuilder

package OOscheme;

/**
 * Represents an algorithm on the AList host.
 * Visitor pattern.
 * @stereotype visitor
 */
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);
}



IListAlgo.java
Created with JBuilder