Module net.finmath.lib
Class BusinessdayCalendarExcludingGivenHolidays
- java.lang.Object
-
- net.finmath.time.businessdaycalendar.AbstractBusinessdayCalendar
-
- net.finmath.time.businessdaycalendar.BusinessdayCalendarExcludingGivenHolidays
-
- All Implemented Interfaces:
Serializable
,BusinessdayCalendar
- Direct Known Subclasses:
BusinessdayCalendarExcludingGivenSetOfHolidays
,BusinessdayCalendarExcludingLONHolidays
,BusinessdayCalendarExcludingNYCHolidays
public abstract class BusinessdayCalendarExcludingGivenHolidays extends AbstractBusinessdayCalendar
An abstract base class for a business day calendar, where every day is a business day, except weekends days provided by aSet
provided by the methodgetHolidays
.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.finmath.time.businessdaycalendar.BusinessdayCalendar
BusinessdayCalendar.DateOffsetUnit, BusinessdayCalendar.DateRollConvention
-
-
Constructor Summary
Constructors Constructor Description BusinessdayCalendarExcludingGivenHolidays(String name, BusinessdayCalendar baseCalendar, boolean isExcludeWeekends)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BusinessdayCalendar
getBaseCalendar()
abstract Set<LocalDate>
getHolidays()
String
getName()
boolean
isBusinessday(LocalDate date)
Test if a given date is a businessday.boolean
isExcludingWeekends()
String
toString()
-
Methods inherited from class net.finmath.time.businessdaycalendar.AbstractBusinessdayCalendar
convertOffsetCodesToTimes, createDateFromDateAndOffsetCodes, getAdjustedDate, getAdjustedDate, getDateFromDateAndOffsetCode, getRolledDate
-
-
-
-
Constructor Detail
-
BusinessdayCalendarExcludingGivenHolidays
public BusinessdayCalendarExcludingGivenHolidays(String name, BusinessdayCalendar baseCalendar, boolean isExcludeWeekends)
-
-
Method Detail
-
getName
public String getName()
- Returns:
- A name of the calendar (e.g. to identify the calendar).
-
getBaseCalendar
public BusinessdayCalendar getBaseCalendar()
- Returns:
- A base calendar, if any. May be null.
-
isExcludingWeekends
public boolean isExcludingWeekends()
- Returns:
- If true, DayOfWeek.SATURDAY and DayOfWeek.SUNDAY are excluded (no-business days)
-
isBusinessday
public boolean isBusinessday(LocalDate date)
Description copied from interface:BusinessdayCalendar
Test if a given date is a businessday.- Parameters:
date
- The given date.- Returns:
- True, if the given date is a businessday, otherwise false.
-
toString
public String toString()
- Overrides:
toString
in classAbstractBusinessdayCalendar
-
-