Enum Class DayType

java.lang.Object
java.lang.Enum<DayType>
org.itsallcode.whiterabbit.api.model.DayType
All Implemented Interfaces:
Serializable, Comparable<DayType>, Constable

public enum DayType extends Enum<DayType>
The type of a day.
  • Enum Constant Details

    • HOLIDAY

      public static final DayType HOLIDAY
      Public holiday (not working)
    • VACATION

      public static final DayType VACATION
      Vacation, paid time off (not working)
    • FLEX_TIME

      public static final DayType FLEX_TIME
      Flex time, reduce overtime (not working)
    • SICK

      public static final DayType SICK
      Sick, paid sick leave (not working)
    • WORK

      public static final DayType WORK
      Normal working day
    • WEEKEND

      public static final DayType WEEKEND
      Weekend (Saturday, Sunday, not working)
  • Method Details

    • values

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

      public static DayType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isWorkDay

      public boolean isWorkDay()
      Check if this is a working day.
      Returns:
      true if you need to work on a day of this type.