Package fr.marcwrobel.jbanking.calendar
Class RelativeHoliday
java.lang.Object
fr.marcwrobel.jbanking.calendar.RelativeHoliday
- All Implemented Interfaces:
Holiday
A
Holiday relative to another Holiday with a fixed day shift.
This class is modeling holidays like easter monday or good friday.
- Since:
- 2.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionRelativeHoliday(Holiday base, int plusDays) Create a new holiday using the givenbase holidayand the given number of days as the shift. -
Method Summary
-
Constructor Details
-
RelativeHoliday
Create a new holiday using the givenbase holidayand the given number of days as the shift.- Parameters:
base- a non-null holiday to use as a base.plusDays- a number of days to use as the shift (can be negative)- Throws:
NullPointerException- if the given base isnull
-
-
Method Details
-
check
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday. -
equals
-
hashCode
public int hashCode() -
toString
-