Package fr.marcwrobel.jbanking.calendar
Class SuppressedHoliday
java.lang.Object
fr.marcwrobel.jbanking.calendar.SuppressedHoliday
- All Implemented Interfaces:
Holiday
A
Holiday that has been punctually suppressed.
This class is useful for modeling holidays like the Spring public holiday in the United Kingdom, that has been exceptionally suppressed in 2002 and 2012 for the golden and diamond jubilee.
- Since:
- 2.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionSuppressedHoliday(Holiday base, Integer... suppressedYears) Create a new holiday using the given base and suppressed years.SuppressedHoliday(Holiday base, Collection<Integer> suppressedYears) Create a new holiday using the given base and suppressed years. -
Method Summary
-
Constructor Details
-
SuppressedHoliday
Create a new holiday using the given base and suppressed years.The replacements are expressed as
k1, v1, k2, v2, ..., kn, vnwhere kn are the original dates dans vn are the replacement.- Parameters:
base- a non-null holiday to use as a base.suppressedYears- a list of year the holiday has been suppressed- Throws:
NullPointerException- ifbaseisnull
-
SuppressedHoliday
Create a new holiday using the given base and suppressed years.The replacements are expressed as
k1, v1, k2, v2, ..., kn, vnwhere kn are the original dates dans vn are the replacement.- Parameters:
base- a non-null holiday to use as a base.suppressedYears- a list of year the holiday has been suppressed- Throws:
NullPointerException- ifbaseisnull
-
-
Method Details
-
check
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday. -
equals
-
hashCode
public int hashCode() -
toString
-