org.cpsolver.coursett.constraint

## Class DiscouragedRoomConstraint.DiscouragedRoomConstraintContext

- java.lang.Object
- - org.cpsolver.coursett.constraint.RoomConstraint.RoomConstraintContext
  - - org.cpsolver.coursett.constraint.DiscouragedRoomConstraint.DiscouragedRoomConstraintContext

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

      public class DiscouragedRoomConstraint.DiscouragedRoomConstraintContext
      extends RoomConstraint.RoomConstraintContext

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DiscouragedRoomConstraintContext(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` | `getLimit()`
    `int` | `getUsage()`
    `boolean` | `isOverLimit(Assignment<Lecture,Placement> assignment, Placement value)`
    `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(Assignment<Lecture,Placement> assignment, Placement value)`

    - ### Methods inherited from class org.cpsolver.coursett.constraint.RoomConstraint.RoomConstraintContext

      `getPlacement, getPlacements, getResourceOfWeek, inConflict`

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

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

- - ### Constructor Detail

    - #### DiscouragedRoomConstraintContext

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

    - #### getLimit

          public int getLimit()

    - #### getUsage

          public int getUsage()

    - #### isOverLimit

          public boolean isOverLimit(Assignment<Lecture,Placement> assignment,
                                     Placement value)

    - #### weaken

          public void weaken()

    - #### weaken

          public void weaken(Assignment<Lecture,Placement> assignment,
                             Placement value)