Interface Holiday

All Known Implementing Classes:
BridgedHoliday, DayOfWeekHoliday, DayOfWeekInMonthHoliday, FixedHoliday, MonthDayHoliday, MovedHoliday, RelativeHoliday, ShiftedHoliday, SuppressedHoliday, WesternEaster, YearRangeHoliday

public interface Holiday
Bank holidays are holidays when banks, and many other businesses, are closed for the day. This interface is representing a public holiday.

Subclasses of this interface are expected to be immutable and thread-safe.

Predefined holidays are available in Holidays.

Since:
2.1.0
See Also:
  • Holidays
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check whether the given date is an occurrence of this holiday.
  • Method Details

    • check

      boolean check(LocalDate date)
      Check whether the given date is an occurrence of this holiday.
      Parameters:
      date - the date to check.
      Returns:
      true if the given date is an occurrence of this holiday, false otherwise.
      Throws:
      NullPointerException - if the given date is null.