Enum WeekendDefinition

java.lang.Object
java.lang.Enum<WeekendDefinition>
org.optaplanner.examples.nurserostering.domain.WeekendDefinition
All Implemented Interfaces:
Serializable, Comparable<WeekendDefinition>

public enum WeekendDefinition extends Enum<WeekendDefinition>
  • Enum Constant Details

    • SATURDAY_SUNDAY

      public static final WeekendDefinition SATURDAY_SUNDAY
    • FRIDAY_SATURDAY_SUNDAY

      public static final WeekendDefinition FRIDAY_SATURDAY_SUNDAY
    • FRIDAY_SATURDAY_SUNDAY_MONDAY

      public static final WeekendDefinition FRIDAY_SATURDAY_SUNDAY_MONDAY
    • SATURDAY_SUNDAY_MONDAY

      public static final WeekendDefinition SATURDAY_SUNDAY_MONDAY
  • Method Details

    • values

      public static WeekendDefinition[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static WeekendDefinition 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
    • valueOfCode

      public static WeekendDefinition valueOfCode(String code)
    • getCode

      public String getCode()
    • getFirstDayOfWeekend

      public DayOfWeek getFirstDayOfWeekend()
    • getLastDayOfWeekend

      public DayOfWeek getLastDayOfWeekend()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<WeekendDefinition>
    • isWeekend

      public boolean isWeekend(DayOfWeek dayOfWeek)
    • getWeekendLength

      public int getWeekendLength()