package view; import java.util.Collection; import schedule.TimeProximity; import database.Course; /** * A TimeProximityView contains the list of time proximities and has the * functionality to add or remove from the list of priorities. * * The TimeProximityView is modeled from Section 2.6.3 of the requirements. * @author vforney */ public abstract class TimeProximityView { /** * Contains a collection of all the TimeProximity's. */ public Collection timeProximities; /** * Adds a TimeProximity to the list of time proximities. * @param timeProximity The TimeProximity to add to the timeProximities list. */ /*@ requires // // The timeProximity is not already in the list. // (!timeProximities.contains(timeProximity)); ensures // // The timeProxmity has been added to the timeProximities list. // (timeProximities.contains(timeProximity)); @*/ public abstract void add(TimeProximity timeProximity); /** * Removes a TimeProximity from the list of time proximities. * @param timeProximity The timeProximity to add to the timeProximities list. */ /*@ requires // // The timeProximity is in the timeProximities list. // (timeProximities.contains(timeProximity)); ensures // // The timeProximity is not in the timeProximities list. // (!timeProximities.contains(timeProximity)); @*/ public abstract void remove(TimeProximity timeProximity); }