org.cpsolver.studentsct.online

## Class OnlineSection

- java.lang.Object
- - org.cpsolver.ifs.assignment.context.AbstractClassWithContext<Request,Enrollment,Section.SectionContext>
  - - org.cpsolver.studentsct.model.Section
    - - org.cpsolver.studentsct.online.OnlineSection

- All Implemented Interfaces:
    Comparable<Section>, AssignmentComparable<Section,Request,Enrollment>, CanHoldContext, CanInheritContext<Request,Enrollment,Section.SectionContext>, HasAssignmentContext<Request,Enrollment,Section.SectionContext>, SctAssignment

      public class OnlineSection
      extends Section

  An online section. A simple extension of the `Section` class that allows to set the current section enrollment. This class is particularly useful when a model containing only the given student is constructed (to provide him/her with a schedule or suggestions).
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2014 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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.cpsolver.studentsct.model.Section

      `Section.SectionContext`

  - ### Field Summary

    - ### Fields inherited from interface org.cpsolver.ifs.assignment.context.CanHoldContext

      `sMaxSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OnlineSection(long id, int limit, String name, Subpart subpart, Placement placement, List<Instructor> instructors, Section parent)`
    `OnlineSection(long id, int limit, String name, Subpart subpart, Placement placement, String instructorIds, String instructorNames, Section parent)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `getDayOfWeekOffset()`
    `int` | `getEnrollment()` Get current enrollment
    `boolean` | `isAlwaysEnabled()`
    `boolean` | `isEnabled()` Return enabled flag of the class.
    `boolean` | `isEnabled(Student student)` Return enabled flag of the class.
    `void` | `setAlwaysEnabled(boolean alwaysEnabled)`
    `void` | `setDayOfWeekOffset(Integer dayOfWeekOffset)`
    `void` | `setEnrollment(int enrollment)` Set current enrollment

    - ### Methods inherited from class org.cpsolver.studentsct.model.Section

      `addIgnoreConflictWith, assigned, clearReservationCache, compareById, compareTo, compareTo, createAssignmentContext, equals, getChoice, getEnrollments, getEnrollmentTotalWeight, getEnrollmentWeight, getId, getIgnoreConflictWithSectionIds, getInstructorNames, getInstructors, getLimit, getLongName, getLongName, getMaxEnrollmentWeight, getMinEnrollmentWeight, getModel, getName, getName, getNameByCourse, getNote, getNrRooms, getOnlineSectioningPenalty, getParent, getPenalty, getPlacement, getReservations, getRooms, getSectionReservations, getSpaceExpected, getSpaceHeld, getSubpart, getTime, getTotalUnreservedSpace, getUnavailabilities, getUnreservedSpace, hashCode, hasInstructors, hasTime, inheritAssignmentContext, isAllowOverlap, isCancelled, isModalityPreferred, isOnline, isOverlapping, isOverlapping, isPast, isToIgnoreStudentConflictsWith, nrInstructors, sameChoice, sameInstructionalType, sameInstructors, sameTime, setCancelled, setEnabled, setLimit, setName, setName, setNote, setOnline, setPast, setPenalty, setPlacement, setSpaceExpected, setSpaceHeld, toString, unassigned`

    - ### Methods inherited from class org.cpsolver.ifs.assignment.context.AbstractClassWithContext

      `getAssignmentContextReference, getContext, getContext, setAssignmentContextReference`

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

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

- - ### Constructor Detail

    - #### OnlineSection

          public OnlineSection(long id,
                               int limit,
                               String name,
                               Subpart subpart,
                               Placement placement,
                               List<Instructor> instructors,
                               Section parent)

    - #### OnlineSection

          @Deprecated
          public OnlineSection(long id,
                                           int limit,
                                           String name,
                                           Subpart subpart,
                                           Placement placement,
                                           String instructorIds,
                                           String instructorNames,
                                           Section parent)

      Deprecated.

  - ### Method Detail

    - #### setEnrollment

          public void setEnrollment(int enrollment)

      Set current enrollment
      Parameters:
        `enrollment` - current enrollment

    - #### getEnrollment

          public int getEnrollment()

      Get current enrollment
      Returns:
        current enrollment

    - #### setAlwaysEnabled

          public void setAlwaysEnabled(boolean alwaysEnabled)

    - #### isAlwaysEnabled

          public boolean isAlwaysEnabled()

    - #### isEnabled

          public boolean isEnabled()

      Description copied from class: `Section`
      Return enabled flag of the class. Use `Section.isEnabled(Student)` where applicable.
      Overrides:
        `isEnabled` in class `Section`
      Returns:
        true if the class is enabled for student scheduling

    - #### isEnabled

          public boolean isEnabled(Student student)

      Description copied from class: `Section`
      Return enabled flag of the class. Also check student class dates.
      Overrides:
        `isEnabled` in class `Section`
      Returns:
        true if the class is enabled for student scheduling

    - #### getDayOfWeekOffset

          protected int getDayOfWeekOffset()

      Overrides:
        `getDayOfWeekOffset` in class `Section`

    - #### setDayOfWeekOffset

          public void setDayOfWeekOffset(Integer dayOfWeekOffset)