|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ftlabs.fisa.DefaultHolidaySchedule
public class DefaultHolidaySchedule
This is the default implementation of HolidaySchedule. For maximum efficiency, this implementation caches all provided holidays so that the isHoliday() method returns as quickly as possible.
| Constructor Summary | |
|---|---|
DefaultHolidaySchedule()
Creates a new instance of DefaultHolidaySchedule without any holidays. |
|
DefaultHolidaySchedule(java.io.InputStream inputStream)
Creates a new instance of DefaultHolidaySchedule populated with the dates provided by an InputStream. |
|
DefaultHolidaySchedule(java.io.InputStream inputStream,
java.text.Format format)
Creates a new instance of DefaultHolidaySchedule populated with the dates provided by an InputStream. |
|
DefaultHolidaySchedule(java.lang.String filePath)
Creates a new instance of DefaultHolidaySchedule populated with dates contained in the provided file. |
|
| Method Summary | |
|---|---|
void |
addHoliday(java.util.Date date)
Add a holiday date to this schedule. |
void |
clear()
Clear all holidays from this schedule. |
boolean |
isHoliday(java.util.Date date)
Determines if the provided date is a holiday. |
void |
loadHolidays(java.io.InputStream inputStream)
Adds dates provided by an InputStream to this DefaultHolidaySchedule. |
void |
loadHolidays(java.io.InputStream inputStream,
java.text.Format format)
Adds dates provided by an InputStream to this DefaultHolidaySchedule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultHolidaySchedule()
public DefaultHolidaySchedule(java.lang.String filePath)
throws java.io.IOException,
java.text.ParseException
filePath - The path to a file that contains the holiday dates.
java.io.IOException
java.text.ParseException
public DefaultHolidaySchedule(java.io.InputStream inputStream)
throws java.io.IOException,
java.text.ParseException
inputStream - An InputStream that contains the holiday dates.
java.io.IOException
java.text.ParseException
public DefaultHolidaySchedule(java.io.InputStream inputStream,
java.text.Format format)
throws java.io.IOException,
java.text.ParseException
inputStream - An InputStream that contains the holiday dates.format - A Format object used to parse the holiday dates contained
within the provided InputStream.
java.io.IOException
java.text.ParseException| Method Detail |
|---|
public void clear()
public void loadHolidays(java.io.InputStream inputStream)
throws java.io.IOException,
java.text.ParseException
inputStream - An InputStream that contains the holiday dates.
java.io.IOException
java.text.ParseException
public void loadHolidays(java.io.InputStream inputStream,
java.text.Format format)
throws java.io.IOException,
java.text.ParseException
inputStream - An InputStream that contains the holiday dates.format - A Format object used to parse the holiday dates contained
within the provided InputStream.
java.io.IOException
java.text.ParseExceptionpublic void addHoliday(java.util.Date date)
date - A holiday date to be added to this schedule.public boolean isHoliday(java.util.Date date)
isHoliday in interface HolidayScheduledate - Any date.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||