Package fr.marcwrobel.jbanking.calendar
Class FixedHoliday
- java.lang.Object
-
- fr.marcwrobel.jbanking.calendar.FixedHoliday
-
-
Constructor Summary
Constructors Constructor Description FixedHoliday(LocalDate... dates)Create a new holiday using the given dates.FixedHoliday(Collection<LocalDate> dates)Create a new holiday using the given dates.
-
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
-
FixedHoliday
public FixedHoliday(Collection<LocalDate> dates)
Create a new holiday using the given dates.- Parameters:
dates- a collection ofLocalDates- Throws:
NullPointerException- if the given collection isnull
-
FixedHoliday
public FixedHoliday(LocalDate... dates)
Create a new holiday using the given dates.- Parameters:
dates- a collection ofLocalDates- Throws:
NullPointerException- if the given collection isnull
-
-
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)
-
-