Package com.walkfares.calendar
Class CombinedHolidayCalendar
java.lang.Object
com.walkfares.calendar.DailyCalendar
com.walkfares.calendar.HolidayCalendar
com.walkfares.calendar.CombinedHolidayCalendar
- All Implemented Interfaces:
Calendar
,HolidayRule
public class CombinedHolidayCalendar extends HolidayCalendar
-
Constructor Summary
Constructors Constructor Description CombinedHolidayCalendar()
CombinedHolidayCalendar(String code)
CombinedHolidayCalendar(String code, String name)
-
Method Summary
Modifier and Type Method Description HolidayCalendar
addRule(HolidayRule rule)
void
addRule(String rule)
UTCDate
align(UTCDate date)
UTCDate
alignBackwards(UTCDate date)
UTCDate
alignForwards(UTCDate date)
Duration
getBasis()
List<String>
getCalendars()
List<Holiday>
getHolidaysForYear(int year)
List<UTCDate>
getIntervals(UTCDate from, int number)
List<UTCDate>
getIntervals(UTCDate from, UTCDate to)
List<HolidayRule>
getRules()
List<HolidayRule>
getSuperRules()
boolean
includes(UTCDate date)
boolean
isHoliday(UTCDate date)
UTCDate
nextInterval(UTCDate from)
UTCDate
prevInterval(UTCDate from)
CombinedHolidayCalendar
with(HolidayCalendar calendar)
Methods inherited from class com.walkfares.calendar.DailyCalendar
getName, getType, setCode, setName
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.walkfares.calendar.Calendar
endOfPeriod, ensureIndex, getName, getType, isIntraday, isSparse, move, newInstance, setCode, setName, validate
-
Constructor Details
-
CombinedHolidayCalendar
public CombinedHolidayCalendar() -
CombinedHolidayCalendar
-
CombinedHolidayCalendar
-
-
Method Details
-
getCalendars
-
with
-
getRules
- Overrides:
getRules
in classHolidayCalendar
-
getSuperRules
-
addRule
- Overrides:
addRule
in classHolidayCalendar
-
addRule
- Overrides:
addRule
in classHolidayCalendar
-
align
- Overrides:
align
in classDailyCalendar
-
getIntervals
- Specified by:
getIntervals
in interfaceCalendar
- Overrides:
getIntervals
in classHolidayCalendar
-
getIntervals
- Specified by:
getIntervals
in interfaceCalendar
- Overrides:
getIntervals
in classHolidayCalendar
-
nextInterval
- Specified by:
nextInterval
in interfaceCalendar
- Overrides:
nextInterval
in classHolidayCalendar
-
prevInterval
- Specified by:
prevInterval
in interfaceCalendar
- Overrides:
prevInterval
in classHolidayCalendar
-
alignBackwards
- Specified by:
alignBackwards
in interfaceCalendar
- Overrides:
alignBackwards
in classHolidayCalendar
-
alignForwards
- Specified by:
alignForwards
in interfaceCalendar
- Overrides:
alignForwards
in classHolidayCalendar
-
includes
- Specified by:
includes
in interfaceCalendar
- Overrides:
includes
in classHolidayCalendar
-
getBasis
- Specified by:
getBasis
in interfaceCalendar
- Overrides:
getBasis
in classDailyCalendar
-
getHolidaysForYear
- Specified by:
getHolidaysForYear
in interfaceHolidayRule
- Overrides:
getHolidaysForYear
in classHolidayCalendar
-
isHoliday
- Specified by:
isHoliday
in interfaceHolidayRule
- Overrides:
isHoliday
in classHolidayCalendar
-