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.

- - ### 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
    --- | ---
    `int` | `getEnrollment()` Get current enrollment
    `void` | `setEnrollment(int enrollment)` Set current enrollment

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

      `addIgnoreConflictWith, assigned, clearReservationCache, compareById, compareTo, compareTo, createAssignmentContext, equals, getEnrollments, getEnrollmentTotalWeight, getEnrollmentWeight, getChoice, 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, isEnabled, 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