org.cpsolver.coursett.sectioning

## Class SctEnrollment

- java.lang.Object
- - org.cpsolver.coursett.sectioning.SctEnrollment

- All Implemented Interfaces:
    Comparable<SctEnrollment>

      public class SctEnrollment
      extends Object
      implements Comparable<SctEnrollment>

  A class wrapping an enrollment of a student into a course. Such an enrollment consists of a list of classes and a conflict weight. That is a weighted sum of the student conflicts (with other courses of the student) it creates.
  Version:
    CourseTT 1.3 (University Course Timetabling)
    Copyright (C) 2017 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
    `SctEnrollment(int id, SctStudent student, Collection<Lecture> lectures)`
    `SctEnrollment(int id, SctStudent student, Collection<Lecture> lectures, double conflictWeight)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(SctEnrollment o)`
    `double` | `getConflictWeight()` Overall conflict weight
    `Integer` | `getId()`
    `List<Lecture>` | `getLectures()` List of classes of this enrollment
    `SctStudent` | `getStudent()` Student
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SctEnrollment

          public SctEnrollment(int id,
                               SctStudent student,
                               Collection<Lecture> lectures,
                               double conflictWeight)

      Parameters:
        `id` - unique id
        `student` - a student
        `lectures` - list of classes
        `conflictWeight` - conflict weight

    - #### SctEnrollment

          public SctEnrollment(int id,
                               SctStudent student,
                               Collection<Lecture> lectures)

      Parameters:
        `id` - unique id
        `student` - a student
        `lectures` - list of classes

  - ### Method Detail

    - #### getStudent

          public SctStudent getStudent()

      Student

    - #### getLectures

          public List<Lecture> getLectures()

      List of classes of this enrollment

    - #### getConflictWeight

          public double getConflictWeight()

      Overall conflict weight

    - #### compareTo

          public int compareTo(SctEnrollment o)

      Specified by:
        `compareTo` in interface `Comparable<SctEnrollment>`

    - #### getId

          public Integer getId()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`