net.objectlab.kit.datecalc.common
Interface HolidayCalendar<E>

Package class diagram package HolidayCalendar
Type Parameters:
E - a representation of a date, typically JDK: Date, Calendar; Joda:LocalDate, YearMonthDay
All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultHolidayCalendar, ImmutableHolidayCalendar

public interface HolidayCalendar<E>
extends Serializable

A Holiday Calendar not only defines a set of holiday dates but an early and late boundary for these dates, e.g. putting the holidays for 2006 in a set with limits of 1 Jan 2006 and 31 Dec 2006 means that 2006 is covered, not that 31 Dec is a holiday itself.

Since:
1.1.0
Version:
$Revision: 200 $ $Date: 2006-10-10 21:15:58 +0100 (Tue, 10 Oct 2006) $
Author:
Benoit Xhenseval, $LastChangedBy: benoitx $

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)
 

Method Detail

getHolidays

Set<E> getHolidays()
Returns an immutable set of holidays.

Returns:
an immutable copy of the holiday set.

setHolidays

void setHolidays(Set<E> holidays)
Takes a copy of the holidays and store it in an immutable set.


getEarlyBoundary

E getEarlyBoundary()
Returns the earliest date covered by this HolidayCalendar.

Returns:
E the earliest date covered by this holiday calendar.

setEarlyBoundary

void setEarlyBoundary(E earlyBoundary)
Sets the earliest date (must be <= first date in holiday set)

Parameters:
earlyBoundary -

getLateBoundary

E getLateBoundary()
Returns the latest date covered by this HolidayCalendar.

Returns:
E the latest date covered by this holiday calendar.

setLateBoundary

void setLateBoundary(E lateBoundary)
Sets the latest date (must be <= first date in holiday set)

Parameters:
lateBoundary -

isHoliday

boolean isHoliday(E date)
Check if a date is a holiday.

Parameters:
date -
Returns:
true if the given date is in the holiday set.


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