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 a Set provided by the method getHolidays.
Version:
1.0
Author:
Christian Fries
See Also:
  • Constructor Details

    • BusinessdayCalendarExcludingGivenHolidays

      public BusinessdayCalendarExcludingGivenHolidays(String name, BusinessdayCalendar baseCalendar, boolean isExcludeWeekends)
  • Method Details

    • 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)
    • getHolidays

      public abstract Set<LocalDate> getHolidays()
      Returns:
      A set of (additional) holidays.
    • 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 class AbstractBusinessdayCalendar