org.cpsolver.coursett.constraint

## Class SoftInstructorConstraint.SoftInstructorConstraintContext

- java.lang.Object
- - org.cpsolver.coursett.constraint.InstructorConstraint.InstructorConstraintContext
  - - org.cpsolver.coursett.constraint.SoftInstructorConstraint.SoftInstructorConstraintContext

- All Implemented Interfaces:
    AssignmentConstraintContext<Lecture,Placement>, AssignmentContext
  Enclosing class:
    SoftInstructorConstraint

      public class SoftInstructorConstraint.SoftInstructorConstraintContext
      extends InstructorConstraint.InstructorConstraintContext

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.coursett.constraint.InstructorConstraint.InstructorConstraintContext

      `iPreference, iResource`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoftInstructorConstraintContext(Assignment<Lecture,Placement> assignment)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assigned(Assignment<Lecture,Placement> assignment, Placement placement)` Called when `ConstraintWithContext.assigned(Assignment, long, Value)` is called to update the content of the context.
    `protected int` | `countConflicts(Assignment<Lecture,Placement> assignment)`
    `int` | `getConflicts()`
    `boolean` | `inConflict(Assignment<Lecture,Placement> assignment, Placement placement)`
    `void` | `unassigned(Assignment<Lecture,Placement> assignment, Placement placement)` Called when `ConstraintWithContext.unassigned(Assignment, long, Value)` is called to update the content of the context.

    - ### Methods inherited from class org.cpsolver.coursett.constraint.InstructorConstraint.InstructorConstraintContext

      `countPreference, getNrSlots, getPlacement, getPlacements, getPlacements, getPlacements, getPreference, getResourceOfWeek`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SoftInstructorConstraintContext

          public SoftInstructorConstraintContext(Assignment<Lecture,Placement> assignment)

  - ### Method Detail

    - #### assigned

          public void assigned(Assignment<Lecture,Placement> assignment,
                               Placement placement)

      Description copied from interface: `AssignmentConstraintContext`
      Called when `ConstraintWithContext.assigned(Assignment, long, Value)` is called to update the content of the context.
      Specified by:
        `assigned` in interface `AssignmentConstraintContext<Lecture,Placement>`
      Overrides:
        `assigned` in class `InstructorConstraint.InstructorConstraintContext`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `placement` - assigned value

    - #### unassigned

          public void unassigned(Assignment<Lecture,Placement> assignment,
                                 Placement placement)

      Description copied from interface: `AssignmentConstraintContext`
      Called when `ConstraintWithContext.unassigned(Assignment, long, Value)` is called to update the content of the context.
      Specified by:
        `unassigned` in interface `AssignmentConstraintContext<Lecture,Placement>`
      Overrides:
        `unassigned` in class `InstructorConstraint.InstructorConstraintContext`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `placement` - unassigned value

    - #### getConflicts

          public int getConflicts()

    - #### countConflicts

          protected int countConflicts(Assignment<Lecture,Placement> assignment)

    - #### inConflict

          public boolean inConflict(Assignment<Lecture,Placement> assignment,
                                    Placement placement)