org.cpsolver.coursett.constraint

## Enum FlexibleConstraint.FlexibleConstraintType

- java.lang.Object
- - java.lang.Enum<FlexibleConstraint.FlexibleConstraintType>
  - - org.cpsolver.coursett.constraint.FlexibleConstraint.FlexibleConstraintType

- All Implemented Interfaces:
    Serializable, Comparable<FlexibleConstraint.FlexibleConstraintType>
  Enclosing class:
    FlexibleConstraint

      public static enum FlexibleConstraint.FlexibleConstraintType
      extends Enum<FlexibleConstraint.FlexibleConstraintType>

  Flexible constraint types

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BREAK` There must be a break of a given length in a given time interval.
    `MAX_BREAKS` Limit number of breaks between adjacent classes on a day.
    `MAX_CONSECUTIVE_DAYS` Limit number of consecutive days of a week.
    `MAX_DAYS` Limit number of days of a week.
    `MAX_HALF_DAYS` Limit number of half-days of a week.
    `MAX_HOLES` Minimize free time of an instructor during a day (between the first and the last class).
    `MAX_WEEKS` Limit number of weeks on which an a class can take place.
    `MAXBLOCK_BACKTOBACK` Given classes must be taught in a way there is a break between two blocks of classes.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FlexibleConstraint` | `create(Long id, String owner, String preference, String reference)`
    `String` | `getName()`
    `String` | `getPattern()`
    `static FlexibleConstraint.FlexibleConstraintType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static FlexibleConstraint.FlexibleConstraintType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### MAXBLOCK_BACKTOBACK

          public static final FlexibleConstraint.FlexibleConstraintType MAXBLOCK_BACKTOBACK

      Given classes must be taught in a way there is a break between two blocks of classes.

    - #### BREAK

          public static final FlexibleConstraint.FlexibleConstraintType BREAK

      There must be a break of a given length in a given time interval.

    - #### MAX_BREAKS

          public static final FlexibleConstraint.FlexibleConstraintType MAX_BREAKS

      Limit number of breaks between adjacent classes on a day.

    - #### MAX_WEEKS

          public static final FlexibleConstraint.FlexibleConstraintType MAX_WEEKS

      Limit number of weeks on which an a class can take place.

    - #### MAX_DAYS

          public static final FlexibleConstraint.FlexibleConstraintType MAX_DAYS

      Limit number of days of a week.

    - #### MAX_HOLES

          public static final FlexibleConstraint.FlexibleConstraintType MAX_HOLES

      Minimize free time of an instructor during a day (between the first and the last class).

    - #### MAX_HALF_DAYS

          public static final FlexibleConstraint.FlexibleConstraintType MAX_HALF_DAYS

      Limit number of half-days of a week.

    - #### MAX_CONSECUTIVE_DAYS

          public static final FlexibleConstraint.FlexibleConstraintType MAX_CONSECUTIVE_DAYS

      Limit number of consecutive days of a week.

  - ### Method Detail

    - #### values

          public static FlexibleConstraint.FlexibleConstraintType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (FlexibleConstraint.FlexibleConstraintType c : FlexibleConstraint.FlexibleConstraintType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static FlexibleConstraint.FlexibleConstraintType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getPattern

          public String getPattern()

    - #### getName

          public String getName()

    - #### create

          public FlexibleConstraint create(Long id,
                                           String owner,
                                           String preference,
                                           String reference)
                                    throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`