org.cpsolver.exam.criteria

## Class ExamRotationPenalty.RotationContext

- java.lang.Object
- - org.cpsolver.ifs.criteria.AbstractCriterion.ValueContext
  - - org.cpsolver.exam.criteria.ExamRotationPenalty.RotationContext

- All Implemented Interfaces:
    AssignmentContext
  Enclosing class:
    ExamRotationPenalty

      protected class ExamRotationPenalty.RotationContext
      extends AbstractCriterion.ValueContext

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.ifs.criteria.AbstractCriterion.ValueContext

      `iTotal`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RotationContext(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 value)` Update value when assigned
    `double` | `averagePeriod()`
    `int` | `nrAssignedExamsWithAvgPeriod()`
    `void` | `unassigned(Assignment<Exam,ExamPlacement> assignment, ExamPlacement value)` Update value when unassigned

    - ### Methods inherited from class org.cpsolver.ifs.criteria.AbstractCriterion.ValueContext

      `getBounds, getTotal, inc, setBounds, setTotal`

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

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

- - ### Constructor Detail

    - #### RotationContext

          public RotationContext(Assignment<Exam,ExamPlacement> assignment)

  - ### Method Detail

    - #### assigned

          public void assigned(Assignment<Exam,ExamPlacement> assignment,
                               ExamPlacement value)

      Description copied from class: `AbstractCriterion.ValueContext`
      Update value when assigned
      Overrides:
        `assigned` in class `AbstractCriterion.ValueContext`
      Parameters:
        `assignment` - current assignment
        `value` - recently assigned value

    - #### unassigned

          public void unassigned(Assignment<Exam,ExamPlacement> assignment,
                                 ExamPlacement value)

      Description copied from class: `AbstractCriterion.ValueContext`
      Update value when unassigned
      Overrides:
        `unassigned` in class `AbstractCriterion.ValueContext`
      Parameters:
        `assignment` - current assignment
        `value` - recently unassigned value

    - #### nrAssignedExamsWithAvgPeriod

          public int nrAssignedExamsWithAvgPeriod()

    - #### averagePeriod

          public double averagePeriod()