import objectdraw.*;

/*
 * A non-empty image stack.  This stack contains a single image,
 * and the rest of the stack after the first image.
 */
public class NonEmptyStack implements StackInterface {
        private VisibleImage log;
        private StackInterface rest;

        // Create a stack out a single image and the rest of the stack
        public NonEmptyStack(VisibleImage theLog, StackInterface theRest) {
                log = theLog;
                rest = theRest;
        }

        public boolean isEmpty() { 
            return false; 
        }
        
        // Return the first element.
        public VisibleImage getFirst() { 
            return log; 
        }
        
        // Return the StackInterface object that represents the rest 
        // of the stack.
        public StackInterface getRest() { 
            return rest; 
        }
        
}
