Package fr.marcwrobel.jbanking.calendar
Class MonthDayHoliday
- java.lang.Object
-
- fr.marcwrobel.jbanking.calendar.MonthDayHoliday
-
-
Constructor Summary
Constructors Constructor Description MonthDayHoliday(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck(LocalDate date)Check whether the given date is an occurrence of this holiday.booleanequals(Object o)inthashCode()StringtoString()
-
-
-
Constructor Detail
-
MonthDayHoliday
public MonthDayHoliday(MonthDay monthDay)
Create a new holiday using the givenMonthDay.- Parameters:
monthDay- a non-nullMonthDay- Throws:
NullPointerException- if the givenMonthDayisnull
-
MonthDayHoliday
public MonthDayHoliday(Month month, int dayOfMonth)
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 Detail
-
check
public boolean check(LocalDate date)
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday.- Specified by:
checkin interfaceHoliday- Parameters:
date- the date to check.- Returns:
trueif the given date is an occurrence of this holiday,falseotherwise.- See Also:
Holiday.check(LocalDate)
-
-