Package fr.marcwrobel.jbanking.calendar
Class ShiftedHoliday
- java.lang.Object
-
- fr.marcwrobel.jbanking.calendar.ShiftedHoliday
-
-
Constructor Summary
Constructors Constructor Description ShiftedHoliday(Holiday base, ShiftingStrategy strategy)Create a new holiday using the givenbase holidayand shifting strategy.
-
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
-
ShiftedHoliday
public ShiftedHoliday(Holiday base, ShiftingStrategy strategy)
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 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)
-
-