package view;

import java.util.Collection;
import schedule.TimePattern;
import schedule.DayPattern;
import java.sql.Time;

/**
 * A TimePatternView contains the list of time patterns and provides the methods
 * to add or remove a time pattern from this list.
 * @author vforney
 */
public abstract class TimePatternView {
  public Collection<TimePattern> timePatterns;

  /**
   * Add a time pattern to the list of time patterns.
   * @param timePattern The TimePattern to remove from the timePatterns list.
   */
  /*@
   requires
   // 
   // The timePattern is not already in the list.
   //
   (!timePatterns.contains(timePattern));

   ensures
   //
   // The timePattern has been added to the list.
   // 
   (timePatterns.contains(timePattern));
  @*/
  public abstract void add(TimePattern timePattern);

  /**
   * Remove a time pattern from the list of time patterns.
   * @param timePattern The TimePattern to remove from the timePatterns list.
   */
  /*@
   requires
   //
   // The timePattern is already in the list.
   //
   (timePatterns.contains(timePattern));

   ensures
   //
   // The timePattern is no longer in the list.
   //
   (!timePatterns.contains(timePattern));
  @*/
  public abstract void remove(TimePattern timePattern);

}