org.cpsolver.studentsct.extension

## Class StudentQuality.Conflict

- java.lang.Object
- - org.cpsolver.studentsct.extension.StudentQuality.Conflict

- Enclosing class:
    StudentQuality

      public class StudentQuality.Conflict
      extends Object

  A representation of a time overlapping conflict

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Conflict(Student student, StudentQuality.Type type, int penalty, Enrollment e1, SctAssignment a1, Enrollment e2, SctAssignment a2)` Constructor
    `Conflict(Student student, StudentQuality.Type type, int penalty, Enrollment e1, SctAssignment a1, SctAssignment a2)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Enrollment` | `getE1()` First enrollment
    `Enrollment` | `getE2()` Second enrollment
    `Enrollment` | `getOther(Enrollment enrollment)` Other enrollment of the conflict
    `int` | `getPenalty()` Conflict penalty, e.g., the number of overlapping slots against the number of slots of the smallest section
    `Request` | `getR1()` First request
    `double` | `getR1Weight()` First request weight
    `Request` | `getR2()` Second request
    `double` | `getR2Weight()` Second request weight
    `SctAssignment` | `getS1()` First section
    `SctAssignment` | `getS2()` Second section
    `Student` | `getStudent()` Related student
    `StudentQuality.Type` | `getType()` Conflict type
    `double` | `getWeight()` Weight of the conflict on both enrollment (sum)
    `double` | `getWeight(Enrollment e)` Weight of the conflict on the given enrollment
    `int` | `hashCode()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Conflict

          public Conflict(Student student,
                          StudentQuality.Type type,
                          int penalty,
                          Enrollment e1,
                          SctAssignment a1,
                          Enrollment e2,
                          SctAssignment a2)

      Constructor
      Parameters:
        `student` - related student
        `type` - conflict type
        `penalty` - conflict penalization, e.g., the number of slots in common between the two conflicting sections
        `e1` - first enrollment
        `a1` - first conflicting section
        `e2` - second enrollment
        `a2` - second conflicting section

    - #### Conflict

          public Conflict(Student student,
                          StudentQuality.Type type,
                          int penalty,
                          Enrollment e1,
                          SctAssignment a1,
                          SctAssignment a2)

  - ### Method Detail

    - #### getStudent

          public Student getStudent()

      Related student
      Returns:
        student

    - #### getS1

          public SctAssignment getS1()

      First section
      Returns:
        first section

    - #### getS2

          public SctAssignment getS2()

      Second section
      Returns:
        second section

    - #### getR1

          public Request getR1()

      First request
      Returns:
        first request

    - #### getR1Weight

          public double getR1Weight()

      First request weight
      Returns:
        first request weight

    - #### getR2Weight

          public double getR2Weight()

      Second request weight
      Returns:
        second request weight

    - #### getR2

          public Request getR2()

      Second request
      Returns:
        second request

    - #### getE1

          public Enrollment getE1()

      First enrollment
      Returns:
        first enrollment

    - #### getE2

          public Enrollment getE2()

      Second enrollment
      Returns:
        second enrollment

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getPenalty

          public int getPenalty()

      Conflict penalty, e.g., the number of overlapping slots against the number of slots of the smallest section
      Returns:
        conflict penalty

    - #### getOther

          public Enrollment getOther(Enrollment enrollment)

      Other enrollment of the conflict

    - #### getWeight

          public double getWeight(Enrollment e)

      Weight of the conflict on the given enrollment

    - #### getWeight

          public double getWeight()

      Weight of the conflict on both enrollment (sum)

    - #### getType

          public StudentQuality.Type getType()

      Conflict type
      Returns:
        conflict type;

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`