Class DayOfWeekInMonthHoliday

    • Constructor Detail

      • DayOfWeekInMonthHoliday

        public DayOfWeekInMonthHoliday​(int weekNumber,
                                       DayOfWeek dayOfWeek,
                                       Month month)
        Create a new holiday using the given DayOfWeek and Month
        Parameters:
        weekNumber - the week within the month, unbounded but typically from -5 to 5
        dayOfWeek - a non-null DayOfWeek
        month - a non-null Month
        Throws:
        NullPointerException - if the given MonthDay is null
    • Method Detail

      • 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:
        Holiday.check(LocalDate)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object