AList.java
Created with JBuilder

/**
 * Represents an abstract Scheme-like list, an  immutable linear recursive
 * structure of data. Has abstract methods to provide its internal data and
 * structure to the client. Since an AList has an internal structure that is
 * isomorphic to itself, it's best to implement it using the composite pattern.
 * @author Dung X. Nguyen
 * @version 1.0
 * @since 01/22/02
 * @Custom Copyright 2002 -All rights reserved
 */
public abstract class AList {
    /**
     * Returns the first element in this AList, if any.
     * The behavior for the empty list is undefined.
     */
    public abstract Object getFirst();

    /**
     * Returns the tail ("rest") of this AList, if any.
     * The behavior for the empty list is undefined.
     */
    public abstract AList getRest();
}



AList.java
Created with JBuilder