net.sf.cpsolver.studentsct.reservation

## Class CourseReservation

- java.lang.Object
- - net.sf.cpsolver.studentsct.reservation.Reservation
  - - net.sf.cpsolver.studentsct.reservation.CourseReservation

- All Implemented Interfaces:
    Comparable<Reservation>

      public class CourseReservation
      extends Reservation

  Course reservation. Students are matched based on their course requests.
  Version:
    StudentSct 1.2 (Student Sectioning)
    Copyright (C) 2007 - 2010 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CourseReservation(long id, Course course)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canAssignOverLimit()` Curriculum reservation cannot go over the limit
    `Course` | `getCourse()` Course offering
    `int` | `getPriority()` Reservation priority (lower than individual and group reservations)
    `double` | `getReservationLimit()` Reservation limit (-1 for unlimited)
    `boolean` | `isApplicable(Student student)` Check the area, classifications and majors
    `boolean` | `mustBeUsed()` Course reservation do not need to be used

    - ### Methods inherited from class net.sf.cpsolver.studentsct.reservation.Reservation

      `addConfig, addSection, assigned, canEnroll, compareTo, getConfigs, getEnrollments, getId, getLimit, getLimitCap, getOffering, getReservedAvailableSpace, getRestrictivity, getSections, getSections, getUsedSpace, isAllowOverlap, isExpired, isIncluded, setExpired, unassigned`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CourseReservation

          public CourseReservation(long id,
                                   Course course)

      Constructor
      Parameters:
        `id` - unique id
        `course` - course offering on which the reservation is set

  - ### Method Detail

    - #### canAssignOverLimit

          public boolean canAssignOverLimit()

      Curriculum reservation cannot go over the limit
      Specified by:
        `canAssignOverLimit` in class `Reservation`

    - #### mustBeUsed

          public boolean mustBeUsed()

      Course reservation do not need to be used
      Specified by:
        `mustBeUsed` in class `Reservation`

    - #### getReservationLimit

          public double getReservationLimit()

      Reservation limit (-1 for unlimited)
      Specified by:
        `getReservationLimit` in class `Reservation`

    - #### getPriority

          public int getPriority()

      Reservation priority (lower than individual and group reservations)
      Specified by:
        `getPriority` in class `Reservation`

    - #### getCourse

          public Course getCourse()

      Course offering

    - #### isApplicable

          public boolean isApplicable(Student student)

      Check the area, classifications and majors
      Specified by:
        `isApplicable` in class `Reservation`
      Parameters:
        `student` - a student
      Returns:
        true if student can use the reservation to get into the course / configuration / section