import objectdraw.*;

/*
 * A non-empty ball list.  This list contains a single ball,
 * and the rest of the list after the first ball.
 */
public class NonEmptyBallList implements BallListInterface {
        private FilledOval oval;
        private BallListInterface rest;

        // Create a list out a single ball and the rest of the list
        public NonEmptyBallList(FilledOval theOval, BallListInterface theRest) {
                oval = theOval;
                rest = theRest;
        }

        public boolean isEmpty() {
                return false;
        }
        
        // Return the first element.
        public FilledOval getFirst() {
                return oval;
        }
        
        // Return the ListInterface object that represents the rest 
        // of the list.
        public BallListInterface getRest() {
                return rest;
        }
        
}
