org.cpsolver.studentsct.extension

## Class DistanceConflict.Conflict

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

- Enclosing class:
    DistanceConflict

      public static class DistanceConflict.Conflict
      extends Object

  A representation of a distance conflict

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Conflict(Student student, Enrollment e1, Section s1, Enrollment e2, Section s2)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `double` | `getDistance(DistanceMetric dm)` The distance between conflicting sections
    `Enrollment` | `getE1()` First enrollment
    `Enrollment` | `getE2()` Second enrollment
    `Request` | `getR1()` First request
    `Request` | `getR2()` Second request
    `Section` | `getS1()` First section
    `Section` | `getS2()` Second section
    `Student` | `getStudent()` Related student
    `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,
                          Enrollment e1,
                          Section s1,
                          Enrollment e2,
                          Section s2)

      Constructor
      Parameters:
        `student` - related student
        `e1` - first enrollment
        `s1` - first conflicting section
        `e2` - second enrollment
        `s2` - second conflicting section

  - ### Method Detail

    - #### getStudent

          public Student getStudent()

      Related student
      Returns:
        student

    - #### getS1

          public Section getS1()

      First section
      Returns:
        first section

    - #### getS2

          public Section getS2()

      Second section
      Returns:
        second section

    - #### getR1

          public Request getR1()

      First request
      Returns:
        first request

    - #### 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`

    - #### getDistance

          public double getDistance(DistanceMetric dm)

      The distance between conflicting sections
      Parameters:
        `dm` - distance metrics
      Returns:
        distance in meters between conflicting sections

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`