Package fr.marcwrobel.jbanking.calendar
Class MonthDayHoliday
java.lang.Object
fr.marcwrobel.jbanking.calendar.MonthDayHoliday
- All Implemented Interfaces:
Holiday
A
Holiday occurring the same day and month every year.
This class is useful for modeling holidays like Christmas.
- Since:
- 2.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionMonthDayHoliday(MonthDay monthDay) Create a new holiday using the givenMonthDay.MonthDayHoliday(Month month, int dayOfMonth) Create a new holiday using the given month and day of month. -
Method Summary
-
Constructor Details
-
MonthDayHoliday
Create a new holiday using the givenMonthDay.- Parameters:
monthDay- a non-nullMonthDay- Throws:
NullPointerException- if the givenMonthDayisnull
-
MonthDayHoliday
Create a new holiday using the given month and day of month.- Parameters:
month- the month-of-year to represent, not nulldayOfMonth- the day-of-month to represent- Throws:
DateTimeException- if the value of any field is out of range, or if the day-of-month is invalid for the month
-
-
Method Details
-
check
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday. -
equals
-
hashCode
public int hashCode() -
toString
-