Holger's
Java API

com.antelmann.calendar
Class HolidayCalendar

java.lang.Object
  extended by com.antelmann.calendar.HolidayCalendar
All Implemented Interfaces:
Serializable

public class HolidayCalendar
extends Object
implements Serializable

maintains a list of days that represent holidays. All Date objects contained are stored as the time of that day at 12:00 am.

Since:
Feb 2006
Author:
Holger Antelmann
See Also:
CalendarUtils.dayBegin(java.util.Date), Serialized Form

Constructor Summary
HolidayCalendar()
           
 
Method Summary
 boolean addHoliday(Holiday holiday)
           
 SortedSet<Holiday> getHolidays()
          returns an unmodifiable view of all holidays
 SortedSet<Holiday> getHolidays(Date date)
          returns the holidays for the given day
 SortedSet<Holiday> getHolidays(Date from, Date until)
          returns all holidays within the given range (inclusive day begin from, exclusive until)
 boolean isHoliday(Date date)
           
 boolean removeHoliday(Holiday holiday)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HolidayCalendar

public HolidayCalendar()
Method Detail

addHoliday

public boolean addHoliday(Holiday holiday)

removeHoliday

public boolean removeHoliday(Holiday holiday)

isHoliday

public boolean isHoliday(Date date)

getHolidays

public SortedSet<Holiday> getHolidays()
returns an unmodifiable view of all holidays


getHolidays

public SortedSet<Holiday> getHolidays(Date date)
returns the holidays for the given day


getHolidays

public SortedSet<Holiday> getHolidays(Date from,
                                      Date until)
returns all holidays within the given range (inclusive day begin from, exclusive until)



(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads