Package fr.marcwrobel.jbanking.calendar
Class DayOfWeekInMonthHoliday
java.lang.Object
fr.marcwrobel.jbanking.calendar.DayOfWeekInMonthHoliday
- All Implemented Interfaces:
Holiday
A
Holiday occurring the same day of the week in a month every year.
This class is using TemporalAdjusters.dayOfWeekInMonth(int, DayOfWeek) under the hood.
This class is useful for modeling holidays like Martin Luther King Jr. Day.
- Since:
- 2.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DayOfWeekInMonthHoliday
- Parameters:
weekNumber- the week within the month, unbounded but typically from -5 to 5dayOfWeek- a non-nullDayOfWeekmonth- a non-nullMonth- Throws:
NullPointerException- if the givenMonthDayisnull
-
-
Method Details
-
check
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday. -
equals
-
hashCode
public int hashCode() -
toString
-