package rebelsky.list; /** * Things that indicate positions in a simple list and can move. * * @author CSC152 2004F */ public interface SimpleCursor { /** * Get a value not yet visited by this cursor. * * @pre * Unvisited values remain in the list. * The list has not changed since this cursor was created. * @exception NoSuchPosition * If no unvisited values remain in the list. */ public Object next() throws NoSuchPosition; /** * Determine whether or not unvisited elements remain. * * @pre * The list has not changed since this cursor was created. */ public boolean hasNext(); } // interface SimpleCursor