org.cpsolver.instructor.model

## Class EnrolledClass

- java.lang.Object
- - org.cpsolver.coursett.model.TimeLocation
  - - org.cpsolver.instructor.model.EnrolledClass

-     public class EnrolledClass
      extends TimeLocation

  Enrolled class to be used as an instructor unavailability.
  Version:
    IFS 1.3 (Instructor Sectioning)
    Copyright (C) 2016 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/.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.cpsolver.coursett.model.TimeLocation

      `TimeLocation.IntEnumeration`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnrolledClass(Long courseId, Long classId, String course, String type, String section, String externalId, int dayCode, int startTime, int length, Long datePatternId, String datePatternName, BitSet weekCode, int breakTime, String room, boolean instructor)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Long` | `getClassId()` Unique id of the enrolled class
    `String` | `getCourse()` Name of the enrolled course
    `Long` | `getCourseId()` Unique id of the enrolled course
    `String` | `getExternalId()` External id of the enrolled class
    `String` | `getRoom()` Room or rooms (comma separated) of the enrolled class
    `String` | `getSection()` Name of the enrolled class
    `String` | `getType()` Name of the instructional type of the enrolled class
    `boolean` | `isInstructor()` Role of the instructor
    `boolean` | `isStudent()` Role of the instructor
    `String` | `toString()`

    - ### Methods inherited from class org.cpsolver.coursett.model.TimeLocation

      `countDates, equals, getBreakTime, getDatePatternId, getDatePatternName, getDatePatternPreference, getDates, getDayCode, getDayHeader, getDays, getDaysArray, getEndTimeHeader, getEndTimeHeader, getEndTimeHeaderNoAdj, getEndTimeHeaderNoAdj, getFirstMeeting, getLength, getLongName, getLongName, getLongNameNoAdj, getLongNameNoAdj, getName, getName, getNormalizedPreference, getNrMeetings, getNrSlotsPerMeeting, getNrWeeks, getNrWeeks, getPreference, getSlots, getStartSlot, getStartSlots, getStartTimeHeader, getStartTimeHeader, getTimePatternId, getWeekCode, hasDate, hasDay, hashCode, hasIntersection, nrSharedDays, nrSharedHours, setBreakTime, setDatePattern, setNormalizedPreference, setPreference, setTimePatternId, shareDays, shareHours, shareWeeks, shareWeeks`

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

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

- - ### Constructor Detail

    - #### EnrolledClass

          public EnrolledClass(Long courseId,
                               Long classId,
                               String course,
                               String type,
                               String section,
                               String externalId,
                               int dayCode,
                               int startTime,
                               int length,
                               Long datePatternId,
                               String datePatternName,
                               BitSet weekCode,
                               int breakTime,
                               String room,
                               boolean instructor)

      Constructor
      Parameters:
        `courseId` - course unique id
        `classId` - class unique id
        `course` - course name
        `type` - instructional type
        `section` - section name
        `externalId` - external id
        `dayCode` - days (combination of 1 for Monday, 2 for Tuesday, ...)
        `startTime` - start slot
        `length` - number of slots
        `datePatternId` - date pattern unique id
        `datePatternName` - date pattern name
        `weekCode` - date pattern (binary string with 1 for each day when classes take place)
        `breakTime` - break time in minutes
        `room` - assigned room(s)
        `instructor` - true if the instructor is teaching the class (not being a student)

  - ### Method Detail

    - #### getCourseId

          public Long getCourseId()

      Unique id of the enrolled course
      Returns:
        course unique id

    - #### getClassId

          public Long getClassId()

      Unique id of the enrolled class
      Returns:
        class unique id

    - #### getCourse

          public String getCourse()

      Name of the enrolled course
      Returns:
        course name

    - #### getSection

          public String getSection()

      Name of the enrolled class
      Returns:
        section name

    - #### getType

          public String getType()

      Name of the instructional type of the enrolled class
      Returns:
        instructional type

    - #### getExternalId

          public String getExternalId()

      External id of the enrolled class
      Returns:
        external id

    - #### getRoom

          public String getRoom()

      Room or rooms (comma separated) of the enrolled class
      Returns:
        assigned room name

    - #### isInstructor

          public boolean isInstructor()

      Role of the instructor
      Returns:
        true if the instructor is teaching this class

    - #### isStudent

          public boolean isStudent()

      Role of the instructor
      Returns:
        true if the instructor is enrolled in this class as student

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `TimeLocation`