org.jfin.date.holiday
Class HolidayCalendarSet
- java.lang.Object
-
- org.jfin.date.holiday.HolidayCalendar
-
- org.jfin.date.holiday.HolidayCalendarSet
-
public class HolidayCalendarSet extends HolidayCalendar
Collector of HolidayCalendars, indistinguishable from any other HolidayCalendar. It can also (unusually) contain sets of other sets.
-
-
Constructor Summary
Constructors Constructor and Description HolidayCalendarSet()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddHolidayCalendar(HolidayCalendar holidayCalendar)Adds a particular holidayCalendar to the setjava.util.IteratorgetHolidayCalendarIterator()Returns an iterator containing all of the holidayCalendarsjava.util.Set<HolidayCalendar>getHolidayCalendars()Returns a set containing all of the holidayCalendarsbooleanisHoliday(java.util.Calendar d)Interrogates all of the contained holidayCalendars returning true if any one of them is a holiday.booleanisWeekend(java.util.Calendar d)Interrogates all of the contained holidayCalendars returning true if any one of them is a weekend.voidremoveHolidayCalendar(HolidayCalendar holidayCalendar)Removes a particular instance of a holidayCalendar from this set-
Methods inherited from class org.jfin.date.holiday.HolidayCalendar
adjust, adjust, adjust, advance, advanceBusinessDays, getBusinessDaysBetween, getDaysInMonth, isLastDayOfMonth, setToEndOfMonth
-
-
-
-
Method Detail
-
addHolidayCalendar
public void addHolidayCalendar(HolidayCalendar holidayCalendar)
Adds a particular holidayCalendar to the set- Parameters:
holidayCalendar-
-
removeHolidayCalendar
public void removeHolidayCalendar(HolidayCalendar holidayCalendar)
Removes a particular instance of a holidayCalendar from this set- Parameters:
holidayCalendar-
-
getHolidayCalendars
public java.util.Set<HolidayCalendar> getHolidayCalendars()
Returns a set containing all of the holidayCalendars- Returns:
- The Set of holidayCalendars
-
getHolidayCalendarIterator
public java.util.Iterator getHolidayCalendarIterator()
Returns an iterator containing all of the holidayCalendars- Returns:
- The Iterator of holidayCalendars
-
isWeekend
public boolean isWeekend(java.util.Calendar d)
Interrogates all of the contained holidayCalendars returning true if any one of them is a weekend.- Specified by:
isWeekendin classHolidayCalendar- Parameters:
d- The calendar to check- Returns:
- true if any one of the set is a weekend, otherwise false
-
isHoliday
public boolean isHoliday(java.util.Calendar d)
Interrogates all of the contained holidayCalendars returning true if any one of them is a holiday.- Specified by:
isHolidayin classHolidayCalendar- Parameters:
d- The calendar to check- Returns:
- true if any one of the set is a holiday, otherwise false
-
-
DataMelt 3.0 © DataMelt by jWork.ORG