public class ImmutableHolidayCalendar<E> extends Object implements HolidayCalendar<E>
UnsupportedOperationException
.Constructor and Description |
---|
ImmutableHolidayCalendar(HolidayCalendar<E> delegate) |
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 ImmutableHolidayCalendar(HolidayCalendar<E> delegate)
public E getEarlyBoundary()
ReadOnlyHolidayCalendar
getEarlyBoundary
in interface ReadOnlyHolidayCalendar<E>
ReadOnlyHolidayCalendar.getEarlyBoundary()
public Set<E> getHolidays()
ReadOnlyHolidayCalendar
getHolidays
in interface ReadOnlyHolidayCalendar<E>
ReadOnlyHolidayCalendar.getHolidays()
public E getLateBoundary()
ReadOnlyHolidayCalendar
getLateBoundary
in interface ReadOnlyHolidayCalendar<E>
ReadOnlyHolidayCalendar.getLateBoundary()
public HolidayCalendar<E> setEarlyBoundary(E earlyBoundary)
HolidayCalendar
setEarlyBoundary
in interface HolidayCalendar<E>
earlyBoundary
- UnsupportedOperationException
- You cannot modify the early boundary, you need to use a new HolidayCalendar.HolidayCalendar.setEarlyBoundary(java.lang.Object)
public HolidayCalendar<E> setHolidays(Set<E> holidays)
HolidayCalendar
setHolidays
in interface HolidayCalendar<E>
holidays
- UnsupportedOperationException
- You cannot modify the holidays, you need to use a new HolidayCalendar.;HolidayCalendar.setHolidays(java.util.Set)
public HolidayCalendar<E> setLateBoundary(E lateBoundary)
HolidayCalendar
setLateBoundary
in interface HolidayCalendar<E>
lateBoundary
- UnsupportedOperationException
- You cannot modify the late boundary, you need to use a new HolidayCalendar.HolidayCalendar.setLateBoundary(java.lang.Object)
public boolean isHoliday(E date)
HolidayCalendar
isHoliday
in interface HolidayCalendar<E>
date
- HolidayCalendar.isHoliday(java.lang.Object)
Copyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.