org.cpsolver.coursett.constraint

## Class FlexibleConstraint.Block

- java.lang.Object
- - org.cpsolver.coursett.constraint.FlexibleConstraint.Block

- Enclosing class:
    FlexibleConstraint

      public class FlexibleConstraint.Block
      extends Object

  A block is a list of placements sorted by startSlot, which are BTB. maxSlotsBetweenBackToBack determines the number of free slots between two BTB placements

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Block(int maxSlotsBetweenBTB)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addPlacement(Placement placement)` Adds placement to the block and updates block's attributes.
    `int` | `getEndSlotCurrentBlock()`
    `int` | `getLengthInSlots()`
    `int` | `getNbrPlacements()`
    `List<Placement>` | `getPlacements()`
    `int` | `getStartSlotCurrentBlock()`
    `boolean` | `haveSameStartTime()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Block

          public Block(int maxSlotsBetweenBTB)

  - ### Method Detail

    - #### addPlacement

          public boolean addPlacement(Placement placement)

      Adds placement to the block and updates block's attributes.
      Parameters:
        `placement` - placement to be added to the block
      Returns:
        true if the placement was successfully added to the block

    - #### haveSameStartTime

          public boolean haveSameStartTime()

    - #### getStartSlotCurrentBlock

          public int getStartSlotCurrentBlock()

    - #### getEndSlotCurrentBlock

          public int getEndSlotCurrentBlock()

    - #### getNbrPlacements

          public int getNbrPlacements()

    - #### getPlacements

          public List<Placement> getPlacements()

    - #### getLengthInSlots

          public int getLengthInSlots()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`