org.cpsolver.studentsct.model

## Interface SctAssignment

- All Known Implementing Classes:
    FreeTimeRequest, OnlineSection, Section, Unavailability

      public interface SctAssignment

  Time and room assignment. This can be either `Section` or `FreeTimeRequest`.
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2007 - 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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)` Enrollment with this assignment was assigned to a `Request`.
    `int` | `compareById(SctAssignment a)` Compare assignments by unique ids.
    `Set<Enrollment>` | `getEnrollments(Assignment<Request,Enrollment> assignment)` Return the list of assigned enrollments that contains this assignment.
    `long` | `getId()` Unique id
    `int` | `getNrRooms()` Number of rooms in which a section meets
    `List<RoomLocation>` | `getRooms()` Room assignment
    `TimeLocation` | `getTime()` Time assignment
    `boolean` | `isAllowOverlap()` Return true if overlaps are allowed, but the number of overlapping slots should be minimized.
    `boolean` | `isOverlapping(SctAssignment assignment)` True, if this assignment is overlapping in time and space with the given assignment.
    `boolean` | `isOverlapping(Set<? extends SctAssignment> assignments)` True, if this assignment is overlapping in time and space with the given set of assignments.
    `void` | `unassigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)` Enrollment with this assignment was unassigned from a `Request`.

- - ### Method Detail

    - #### getTime

          TimeLocation getTime()

      Time assignment
      Returns:
        time assignment

    - #### getRooms

          List<RoomLocation> getRooms()

      Room assignment
      Returns:
        list of `RoomLocation`

    - #### getNrRooms

          int getNrRooms()

      Number of rooms in which a section meets
      Returns:
        number of rooms in which a section meets

    - #### isOverlapping

          boolean isOverlapping(SctAssignment assignment)

      True, if this assignment is overlapping in time and space with the given assignment.
      Parameters:
        `assignment` - another assignment
      Returns:
        true if there is an overlap

    - #### isOverlapping

          boolean isOverlapping(Set<? extends SctAssignment> assignments)

      True, if this assignment is overlapping in time and space with the given set of assignments.
      Parameters:
        `assignments` - a set of assignments
      Returns:
        true if one of them overlaps

    - #### assigned

          void assigned(Assignment<Request,Enrollment> assignment,
                        Enrollment enrollment)

      Enrollment with this assignment was assigned to a `Request`.
      Parameters:
        `assignment` - current assignment
        `enrollment` - an enrollment that was just assigned

    - #### unassigned

          void unassigned(Assignment<Request,Enrollment> assignment,
                          Enrollment enrollment)

      Enrollment with this assignment was unassigned from a `Request`.
      Parameters:
        `assignment` - current assignment
        `enrollment` - an enrollment that was just unassigned

    - #### getEnrollments

          Set<Enrollment> getEnrollments(Assignment<Request,Enrollment> assignment)

      Return the list of assigned enrollments that contains this assignment.
      Parameters:
        `assignment` - current assignments
      Returns:
        a list of assigned enrollments (of this request) that contains this assignment

    - #### isAllowOverlap

          boolean isAllowOverlap()

      Return true if overlaps are allowed, but the number of overlapping slots should be minimized.
      Returns:
        true, if overlaps are allowed

    - #### getId

          long getId()

      Unique id
      Returns:
        section unique id

    - #### compareById

          int compareById(SctAssignment a)

      Compare assignments by unique ids.
      Parameters:
        `a` - another section assignment
      Returns:
        comparison