Enum DayOfWeekHoliday

java.lang.Object
java.lang.Enum<DayOfWeekHoliday>
fr.marcwrobel.jbanking.calendar.DayOfWeekHoliday
All Implemented Interfaces:
Holiday, Serializable, Comparable<DayOfWeekHoliday>, java.lang.constant.Constable

public enum DayOfWeekHoliday extends Enum<DayOfWeekHoliday> implements Holiday
A Holiday occurring the same day every week.

This class is useful for modeling weekends.

Since:
2.1.0
  • Enum Constant Details

    • MONDAY

      public static final DayOfWeekHoliday MONDAY
      Monday is the day of the week between Sunday and Tuesday. It seems it is never a weekend day.
      See Also:
    • TUESDAY

      public static final DayOfWeekHoliday TUESDAY
      Tuesday is the day of the week between Monday and Wednesday. It seems it is never a weekend day.
      See Also:
    • WEDNESDAY

      public static final DayOfWeekHoliday WEDNESDAY
      Wednesday is the day of the week between Tuesday and Thursday. It seems it is never a weekend day.
      See Also:
    • THURSDAY

      public static final DayOfWeekHoliday THURSDAY
      Thursday is the day of the week between Wednesday and Friday. It seems is never a weekend day.
      See Also:
    • FRIDAY

      public static final DayOfWeekHoliday FRIDAY
      Friday is the day of the week between Thursday and Saturday. Friday is the first day of the weekend in some countries, with Saturday the second.
      See Also:
    • SATURDAY

      public static final DayOfWeekHoliday SATURDAY
      Saturday is the day of the week between Friday and Sunday. In most countries, Saturday is a weekend day.
      See Also:
    • SUNDAY

      public static final DayOfWeekHoliday SUNDAY
      Sunday is the day of the week between Saturday and Monday. Sunday is a day of rest in most Western countries, and a part of the weekend.
      See Also:
  • Method Details

    • values

      public static DayOfWeekHoliday[] 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 DayOfWeekHoliday 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
    • check

      public boolean check(LocalDate date)
      Description copied from interface: Holiday
      Check whether the given date is an occurrence of this holiday.
      Specified by:
      check in interface Holiday
      Parameters:
      date - the date to check.
      Returns:
      true if the given date is an occurrence of this holiday, false otherwise.
      See Also: