public class DefaultHolidayCalendar<E extends Serializable> extends Object implements HolidayCalendar<E>
Constructor and Description |
---|
DefaultHolidayCalendar() |
DefaultHolidayCalendar(Set<E> holidays) |
DefaultHolidayCalendar(Set<E> holidays,
E earlyBoundary,
E lateBoundary) |
Modifier and Type | Method and Description |
---|---|
E |
getEarlyBoundary()
Returns the earliest date covered by this HolidayCalendar.
|
Set<E> |
getHolidays()
Returns an immutable set of holidays.
|
E |
getLateBoundary()
Returns the latest date covered by this HolidayCalendar.
|
boolean |
isHoliday(E date)
Check if a date is a holiday.
|
HolidayCalendar<E> |
setEarlyBoundary(E earlyBoundary)
Sets the earliest date (must be <= first date in holiday set)
|
HolidayCalendar<E> |
setHolidays(Set<E> holidays)
Takes a copy of the holidays and store it in an immutable
set.
|
HolidayCalendar<E> |
setLateBoundary(E lateBoundary)
Sets the latest date (must be <= first date in holiday set)
|
public DefaultHolidayCalendar()
public DefaultHolidayCalendar(Set<E> holidays, E earlyBoundary, E lateBoundary)
public E getEarlyBoundary()
ReadOnlyHolidayCalendar
getEarlyBoundary
in interface ReadOnlyHolidayCalendar<E extends Serializable>
public Set<E> getHolidays()
ReadOnlyHolidayCalendar
getHolidays
in interface ReadOnlyHolidayCalendar<E extends Serializable>
public E getLateBoundary()
ReadOnlyHolidayCalendar
getLateBoundary
in interface ReadOnlyHolidayCalendar<E extends Serializable>
public HolidayCalendar<E> setEarlyBoundary(E earlyBoundary)
HolidayCalendar
setEarlyBoundary
in interface HolidayCalendar<E extends Serializable>
public final HolidayCalendar<E> setHolidays(Set<E> holidays)
HolidayCalendar
setHolidays
in interface HolidayCalendar<E extends Serializable>
public HolidayCalendar<E> setLateBoundary(E lateBoundary)
HolidayCalendar
setLateBoundary
in interface HolidayCalendar<E extends Serializable>
public boolean isHoliday(E date)
HolidayCalendar
isHoliday
in interface HolidayCalendar<E extends Serializable>
Copyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.