org.cpsolver.coursett.constraint

## Class MinimizeNumberOfUsedGroupsOfTime.MinimizeNumberOfUsedGroupsOfTimeContext

- java.lang.Object
- - org.cpsolver.coursett.constraint.MinimizeNumberOfUsedGroupsOfTime.MinimizeNumberOfUsedGroupsOfTimeContext

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

      public class MinimizeNumberOfUsedGroupsOfTime.MinimizeNumberOfUsedGroupsOfTimeContext
      extends Object
      implements AssignmentConstraintContext<Lecture,Placement>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinimizeNumberOfUsedGroupsOfTimeContext(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.
    `int` | `currentUsage()`
    `int` | `getOverLimit(Placement placement)`
    `Set<Placement>` | `getUsage(int slot)`
    `boolean` | `isOverLimit(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.
    `void` | `weaken()`
    `void` | `weaken(Placement value)`

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

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

- - ### Constructor Detail

    - #### MinimizeNumberOfUsedGroupsOfTimeContext

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

    - #### currentUsage

          public int currentUsage()

    - #### isOverLimit

          public boolean isOverLimit(Placement placement)

    - #### getOverLimit

          public int getOverLimit(Placement placement)

    - #### weaken

          public void weaken()

    - #### weaken

          public void weaken(Placement value)

    - #### getUsage

          public Set<Placement> getUsage(int slot)