Package fr.marcwrobel.jbanking.calendar
Class ConfigurableCalendar
java.lang.Object
fr.marcwrobel.jbanking.calendar.ConfigurableCalendar
- All Implemented Interfaces:
Calendar
A
Calendar that can be programmatically configured.- Since:
- 2.1.0
-
Field Summary
Fields inherited from interface fr.marcwrobel.jbanking.calendar.Calendar
MAX_ITERATIONS -
Constructor Summary
ConstructorsConstructorDescriptionConfigurableCalendar(Holiday... holidays) Creates a new instance using the given bankHolidays.ConfigurableCalendar(Collection<Holiday> holidays) Creates a new instance using the given bankHolidays. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.marcwrobel.jbanking.calendar.Calendar
businessDaysWithin, holidaysWithin, isBusinessDay, next, nextOrSame, previous, previousOrSame, shift
-
Constructor Details
-
ConfigurableCalendar
Creates a new instance using the given bankHolidays.- Parameters:
holidays- theHolidays that the calendar will be using.- Throws:
NullPointerException- ifholidaysis {code null} or if one of the holiday inholidaysis {code null}.
-
ConfigurableCalendar
Creates a new instance using the given bankHolidays.- Parameters:
holidays- theHolidays that the calendar will be using.- Throws:
NullPointerException- ifholidaysis {code null} or if one of the holiday inholidaysis {code null}.
-
-
Method Details
-
isHoliday
Description copied from interface:CalendarCheck whether the given date is a public holiday. -
getHolidaysFor
Description copied from interface:CalendarGet all theHolidays matching with the given day.- Specified by:
getHolidaysForin interfaceCalendar- Parameters:
date- a non-null and unmodifiable set ofHolidays.- Returns:
trueif the given date is a holiday,falseotherwise.- See Also:
-