package view;

import database.Schedule;
import schedule.Scheduler;
import database.Course;
import database.Room;
import database.Instructor;
import java.util.Collection;
import java.util.Date;
import schedule.ScheduleCourse;

/**
 * The representation of a schedule.
 */
public abstract class ScheduleView {
  /** 
   * The schedule to display.
   */
  Schedule schedule;

  /** 
   * Instructors that appear in the view. 
   */
  Collection<Instructor> instructors;

  /** 
   * Courses that appear in the view. 
   */
  Collection<Course> courses;

  /** 
   * Rooms that appear in the view. 
   */
  Collection<Room> rooms;

  /** 
   * All scheduded courses for this schedule. 
   */ 
  Collection<ScheduleCourse> allScheduleCourses;

  /** 
   * Scheduded courses that will be displayed.
   */ 
  Collection<ScheduleCourse> displayedScheduleCourses; 

  /**
   * Sets the schedule for this view.
   */ 
  /*@ 
    requires
      (schedule != null);

    ensures
      this.schedule == schedule;
  @*/
  abstract void setSchedule(Schedule schedule);

  /**
   * Filters |scheduleCourses| via these input parameters.
   * @param room The rooms to display.
   * @param course The courses to display.
   * @param instructor The instructors to display.
   */
  /*@ 
    requires
      (rooms != null)
        &&
      (courses != null)
        &&
      (instructors != null); 

    ensures
      (this.rooms.containsAll(rooms)) 
        && 
      (this.rooms.size() == rooms.size())
        &&
      (this.courses.containsAll(courses)) 
        && 
      (this.courses.size() == courses.size())
        &&
      (this.instructors.containsAll(instructors)) 
        && 
      (this.instructors.size() <#= instructors.size());
  @*/
  abstract void filter(Collection<Room> rooms, Collection<Course> courses, Collection<Instructor> instructors);
}