org.cpsolver.exam.model

## Class ExamDistributionConstraint.Context

- java.lang.Object
- - org.cpsolver.exam.model.ExamDistributionConstraint.Context

- All Implemented Interfaces:
    AssignmentConstraintContext<Exam,ExamPlacement>, AssignmentContext
  Enclosing class:
    ExamDistributionConstraint

      public class ExamDistributionConstraint.Context
      extends Object
      implements AssignmentConstraintContext<Exam,ExamPlacement>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Context(Assignment<Exam,ExamPlacement> assignment)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assigned(Assignment<Exam,ExamPlacement> assignment, ExamPlacement placement)` Called when `ConstraintWithContext.assigned(Assignment, long, Value)` is called to update the content of the context.
    `int` | `getViolations()`
    `void` | `unassigned(Assignment<Exam,ExamPlacement> assignment, ExamPlacement placement)` Called when `ConstraintWithContext.unassigned(Assignment, long, Value)` is called to update the content of the context.
    `protected void` | `updateCriterion(Assignment<Exam,ExamPlacement> assignment)`

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

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

- - ### Constructor Detail

    - #### Context

          public Context(Assignment<Exam,ExamPlacement> assignment)

  - ### Method Detail

    - #### assigned

          public void assigned(Assignment<Exam,ExamPlacement> assignment,
                               ExamPlacement 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<Exam,ExamPlacement>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `placement` - assigned value

    - #### unassigned

          public void unassigned(Assignment<Exam,ExamPlacement> assignment,
                                 ExamPlacement 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<Exam,ExamPlacement>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `placement` - unassigned value

    - #### updateCriterion

          protected void updateCriterion(Assignment<Exam,ExamPlacement> assignment)

    - #### getViolations

          public int getViolations()