net.objectlab.kit.datecalc.common
Class DefaultHolidayCalendar<E>

Package class diagram package DefaultHolidayCalendar
java.lang.Object
  extended by net.objectlab.kit.datecalc.common.DefaultHolidayCalendar<E>
All Implemented Interfaces:
Serializable, HolidayCalendar<E>

public class DefaultHolidayCalendar<E>
extends Object
implements HolidayCalendar<E>

Version:
$Revision: 138 $ $Date: 2006-09-10 13:29:15 +0100 (Sun, 10 Sep 2006) $
Author:
xhensevb, $LastChangedBy: marchy $
See Also:
Serialized Form

Constructor Summary
DefaultHolidayCalendar()
           
DefaultHolidayCalendar(Set<E> holidays)
           
DefaultHolidayCalendar(Set<E> holidays, E earlyBoundary, E lateBoundary)
           
 
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

DefaultHolidayCalendar

public DefaultHolidayCalendar()

DefaultHolidayCalendar

public DefaultHolidayCalendar(Set<E> holidays,
                              E earlyBoundary,
                              E lateBoundary)

DefaultHolidayCalendar

public DefaultHolidayCalendar(Set<E> holidays)
Method Detail

getEarlyBoundary

public E getEarlyBoundary()
Description copied from interface: HolidayCalendar
Returns the earliest date covered by this HolidayCalendar.

Specified by:
getEarlyBoundary in interface HolidayCalendar<E>
Returns:
E the earliest date covered by this holiday calendar.

getHolidays

public Set<E> getHolidays()
Description copied from interface: HolidayCalendar
Returns an immutable set of holidays.

Specified by:
getHolidays in interface HolidayCalendar<E>
Returns:
an immutable copy of the holiday set.

getLateBoundary

public E getLateBoundary()
Description copied from interface: HolidayCalendar
Returns the latest date covered by this HolidayCalendar.

Specified by:
getLateBoundary in interface HolidayCalendar<E>
Returns:
E the latest date covered by this holiday calendar.

setEarlyBoundary

public void setEarlyBoundary(E earlyBoundary)
Description copied from interface: HolidayCalendar
Sets the earliest date (must be <= first date in holiday set)

Specified by:
setEarlyBoundary in interface HolidayCalendar<E>

setHolidays

public final void setHolidays(Set<E> holidays)
Description copied from interface: HolidayCalendar
Takes a copy of the holidays and store it in an immutable set.

Specified by:
setHolidays in interface HolidayCalendar<E>

setLateBoundary

public void setLateBoundary(E lateBoundary)
Description copied from interface: HolidayCalendar
Sets the latest date (must be <= first date in holiday set)

Specified by:
setLateBoundary in interface HolidayCalendar<E>

isHoliday

public boolean isHoliday(E date)
Description copied from interface: HolidayCalendar
Check if a date is a holiday.

Specified by:
isHoliday in interface HolidayCalendar<E>
Returns:
true if the given date is in the holiday set.


Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.