org.cpsolver.studentsct.reservation

## Class CourseRestriction

- java.lang.Object
- - org.cpsolver.studentsct.reservation.Restriction
  - - org.cpsolver.studentsct.reservation.CourseRestriction

-     public class CourseRestriction
      extends Restriction

  Group restriction. Students are matched based on their course requests.
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2007 - 2020 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/.
  Author:
    Tomáš Müller

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Course` | `getCourse()` Course offering
    `boolean` | `isApplicable(Student student, Course course)` Check the area, classifications and majors

    - ### Methods inherited from class org.cpsolver.studentsct.reservation.Restriction

      `addConfig, addSection, getConfigs, getId, getOffering, getSections, getSections, isApplicable, isIncluded, isIncluded, isIncluded`

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

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

- - ### Constructor Detail

    - #### CourseRestriction

          public CourseRestriction(long id,
                                   Course course)

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

  - ### Method Detail

    - #### getCourse

          public Course getCourse()

      Course offering
      Returns:
        course offering

    - #### isApplicable

          public boolean isApplicable(Student student,
                                      Course course)

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