Package com.walkfares.calendar
Class HolidayCalendar
java.lang.Object
com.walkfares.calendar.DailyCalendar
com.walkfares.calendar.HolidayCalendar
- All Implemented Interfaces:
Calendar
,HolidayRule
- Direct Known Subclasses:
BusinessCalendar
,CombinedHolidayCalendar
public class HolidayCalendar extends DailyCalendar implements HolidayRule, Calendar
-
Constructor Summary
Constructors Constructor Description HolidayCalendar()
HolidayCalendar(String code)
HolidayCalendar(String code, String name)
-
Method Summary
Modifier and Type Method Description HolidayCalendar
addRule(HolidayRule rule)
void
addRule(String rule)
UTCDate
alignBackwards(UTCDate date)
UTCDate
alignForwards(UTCDate date)
boolean
equals(Object obj)
String
getCode()
List<Holiday>
getHolidaysForYear(int year)
List<UTCDate>
getIntervals(UTCDate from, int number)
List<UTCDate>
getIntervals(UTCDate from, UTCDate to)
List<HolidayRule>
getRules()
boolean
includes(UTCDate date)
boolean
isHoliday(UTCDate date)
UTCDate
nextInterval(UTCDate from)
UTCDate
prevInterval(UTCDate from)
Methods inherited from class com.walkfares.calendar.DailyCalendar
align, getBasis, 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, getBasis, getName, getType, isIntraday, isSparse, move, newInstance, setCode, setName, validate
-
Constructor Details
-
HolidayCalendar
public HolidayCalendar() -
HolidayCalendar
-
HolidayCalendar
-
-
Method Details
-
addRule
-
addRule
-
getCode
- Specified by:
getCode
in interfaceCalendar
- Specified by:
getCode
in interfaceHolidayRule
- Overrides:
getCode
in classDailyCalendar
-
getIntervals
- Specified by:
getIntervals
in interfaceCalendar
- Overrides:
getIntervals
in classDailyCalendar
-
getIntervals
- Specified by:
getIntervals
in interfaceCalendar
- Overrides:
getIntervals
in classDailyCalendar
-
nextInterval
- Specified by:
nextInterval
in interfaceCalendar
- Overrides:
nextInterval
in classDailyCalendar
-
prevInterval
- Specified by:
prevInterval
in interfaceCalendar
- Overrides:
prevInterval
in classDailyCalendar
-
getHolidaysForYear
- Specified by:
getHolidaysForYear
in interfaceHolidayRule
-
includes
- Specified by:
includes
in interfaceCalendar
- Overrides:
includes
in classDailyCalendar
-
isHoliday
- Specified by:
isHoliday
in interfaceHolidayRule
-
alignBackwards
- Specified by:
alignBackwards
in interfaceCalendar
- Overrides:
alignBackwards
in classDailyCalendar
-
alignForwards
- Specified by:
alignForwards
in interfaceCalendar
- Overrides:
alignForwards
in classDailyCalendar
-
getRules
-
equals
- Overrides:
equals
in classDailyCalendar
-