All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.finmath.time.businessdaycalendar.BusinessdayCalendarExcludingGivenSetOfHolidays Maven / Gradle / Ivy

Go to download

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; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy