net.finmath.time.businessdaycalendar.BusinessdayCalendarExcludingGivenSetOfHolidays Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
The newest version!
package net.finmath.time.businessdaycalendar;
import java.time.LocalDate;
import java.util.Set;
/**
* A class for a business day calendar, where every day is a business day, except
* weekends days provided by a Set
.
*
* @author Christian Fries
* @version 1.0
*/
public abstract class BusinessdayCalendarExcludingGivenSetOfHolidays extends BusinessdayCalendarExcludingGivenHolidays {
/**
*
*/
private static final long serialVersionUID = -485496533316101770L;
private final Set holidays;
public BusinessdayCalendarExcludingGivenSetOfHolidays(final String name, final BusinessdayCalendar baseCalendar, final boolean isExcludeWeekends, final Set holidays) {
super(name, baseCalendar, isExcludeWeekends);
this.holidays = holidays;
}
public BusinessdayCalendarExcludingGivenSetOfHolidays(final String name, final boolean isExcludeWeekends, final Set holidays) {
this(name, null, isExcludeWeekends, holidays);
}
/**
* @return A set of (additional) holidays.
*/
@Override
public Set getHolidays() { return holidays; }
}