|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.objectlab.kit.datecalc.common.ImmutableHolidayCalendar<E>
public class ImmutableHolidayCalendar<E>
This is an immutable holiday calendar, once given to a DateCalculator, a HolidayCalendar cannot be
modified, it will throw UnsupportedOperationException.
| Constructor Summary | |
|---|---|
ImmutableHolidayCalendar(HolidayCalendar<E> delegate)
|
|
| Method Summary | |
|---|---|
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. |
void |
setEarlyBoundary(E earlyBoundary)
Sets the earliest date (must be <= first date in holiday set) |
void |
setHolidays(Set<E> holidays)
Takes a copy of the holidays and store it in an immutable set. |
void |
setLateBoundary(E lateBoundary)
Sets the latest date (must be <= first date in holiday set) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImmutableHolidayCalendar(HolidayCalendar<E> delegate)
| Method Detail |
|---|
public E getEarlyBoundary()
HolidayCalendar
getEarlyBoundary in interface HolidayCalendar<E>HolidayCalendar.getEarlyBoundary()public Set<E> getHolidays()
HolidayCalendar
getHolidays in interface HolidayCalendar<E>HolidayCalendar.getHolidays()public E getLateBoundary()
HolidayCalendar
getLateBoundary in interface HolidayCalendar<E>HolidayCalendar.getLateBoundary()public void 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 void 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 void 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||