Package fr.marcwrobel.jbanking.calendar
Class CompositeCalendar
java.lang.Object
fr.marcwrobel.jbanking.calendar.CompositeCalendar
- All Implemented Interfaces:
Calendar
A
Calendar that can combine multiple calendars into a single one.- Since:
- 3.0.0
-
Field Summary
Fields inherited from interface fr.marcwrobel.jbanking.calendar.Calendar
MAX_ITERATIONS -
Constructor Summary
ConstructorsConstructorDescriptionCompositeCalendar(Calendar... calendars) Creates a new instance using the givenCalendars.CompositeCalendar(Collection<Calendar> calendars) Creates a new instance using the givenCalendars. -
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
-
CompositeCalendar
Creates a new instance using the givenCalendars.- Parameters:
calendars- theCalendars to use in this composite calendar- Throws:
NullPointerException- ifcalendarsis {code null}IllegalArgumentException- ifcalendarsis empty
-
CompositeCalendar
Creates a new instance using the givenCalendars.- Parameters:
calendars- theCalendars to use in this composite calendar- Throws:
NullPointerException- ifcalendarsis {code null}IllegalArgumentException- ifcalendarsis empty
-
-
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:
-