Package fr.marcwrobel.jbanking.calendar
Class ShiftedHoliday
java.lang.Object
fr.marcwrobel.jbanking.calendar.ShiftedHoliday
- All Implemented Interfaces:
Holiday
A
Holiday relative to another Holiday with a fixed day shift.
This class is modeling holidays like the Independence Day in the United States.
- Since:
- 2.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionShiftedHoliday(Holiday base, ShiftingStrategy strategy) Create a new holiday using the givenbase holidayand shifting strategy. -
Method Summary
-
Constructor Details
-
ShiftedHoliday
Create a new holiday using the givenbase holidayand shifting strategy.- Parameters:
base- a non-null holiday to use as a base.strategy- a non-null strategy to use as for shifting dates.- Throws:
NullPointerException- if the eitherbaseorstrategyisnull
-
-
Method Details
-
check
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday. -
equals
-
hashCode
public int hashCode() -
toString
-