Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz.impl.calendar
Class HolidayCalendar

    java.lang.Object
      org.quartz.impl.calendar.BaseCalendar
          org.quartz.impl.calendar.HolidayCalendar

All Implemented Interfaces:
  Calendar, Serializable

public class HolidayCalendar
extends BaseCalendar
implements Calendar, Serializable

This implementation of the Calendar stores a list of holidays (full days that are excluded from scheduling).

The implementation DOES take the year into consideration, so if you want to exclude July 4th for the next 10 years, you need to add 10 entries to the exclude list.

Author:
  Sharada Jambula, Juergen Donnerstag
See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.quartz.Calendar
`MONTH`

Constructor Summary
`HolidayCalendar()` Constructor
`HolidayCalendar(Calendar baseCalendar)` Constructor

Method Summary
`void` | `addExcludedDate(Date excludedDate)` Add the given Date to the list of excluded days.
`SortedSet` | `getExcludedDates()` Returns a `SortedSet` of Dates representing the excluded days.
`long` | `getNextIncludedTime(long timeStamp)` Determine the next time (in milliseconds) that is 'included' by the Calendar after the given time.
`boolean` | `isTimeIncluded(long timeStamp)` Determine whether the given time (in milliseconds) is 'included' by the Calendar.
`void` | `removeExcludedDate(Date dateToRemove)`

Methods inherited from class org.quartz.impl.calendar.BaseCalendar
`buildHoliday, buildHoliday, getBaseCalendar, getDescription, getJavaCalendar, setBaseCalendar, setDescription`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.quartz.Calendar
`getBaseCalendar, getDescription, setBaseCalendar, setDescription`

Constructor Detail

### HolidayCalendar

    public HolidayCalendar()

  Constructor

### HolidayCalendar

    public HolidayCalendar(Calendar baseCalendar)

  Constructor

Method Detail

### isTimeIncluded

    public boolean isTimeIncluded(long timeStamp)

  Determine whether the given time (in milliseconds) is 'included' by the Calendar.

  Note that this Calendar is only has full-day precision.

  Specified by:
    `isTimeIncluded` in interface `Calendar`
  Overrides:
    `isTimeIncluded` in class `BaseCalendar`
  See Also:
    `Calendar.isTimeIncluded(long)`

### getNextIncludedTime

    public long getNextIncludedTime(long timeStamp)

  Determine the next time (in milliseconds) that is 'included' by the Calendar after the given time.

  Note that this Calendar is only has full-day precision.

  Specified by:
    `getNextIncludedTime` in interface `Calendar`
  Overrides:
    `getNextIncludedTime` in class `BaseCalendar`
  See Also:
    `Calendar.getNextIncludedTime(long)`

### addExcludedDate

    public void addExcludedDate(Date excludedDate)

  Add the given Date to the list of excluded days. Only the month, day and year of the returned dates are significant.

### removeExcludedDate

    public void removeExcludedDate(Date dateToRemove)

### getExcludedDates

    public SortedSet getExcludedDates()

  Returns a `SortedSet` of Dates representing the excluded days. Only the month, day and year of the returned dates are significant.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD