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
Interface Calendar

All Superinterfaces:
  Cloneable, Serializable

All Known Implementing Classes:
  AnnualCalendar, BaseCalendar, CronCalendar, DailyCalendar, HolidayCalendar, MonthlyCalendar, WeeklyCalendar

    public interface Calendar

extends Serializable, Cloneable

An interface to be implemented by objects that define spaces of time during which an associated ``Trigger`` may (not) fire. Calendars do not define actual fire times, but rather are used to limit a `Trigger` from firing on its normal schedule if necessary. Most Calendars include all times by default and allow the user to specify times to exclude.

As such, it is often useful to think of Calendars as being used to exclude a block of time - as opposed to include a block of time. (i.e. the schedule "fire every five minutes except on Sundays" could be implemented with a `SimpleTrigger` and a `WeeklyCalendar` which excludes Sundays)

Implementations MUST take care of being properly `Cloneable` and `Serializable`.

Author:
  James House, Juergen Donnerstag

Field Summary
`static int` | `MONTH`

Method Summary
`Object` | `clone()`
`Calendar` | `getBaseCalendar()` Get the base calendar.
`String` | `getDescription()` Return the description given to the `Calendar` instance by its creator (if any).
`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` | `setBaseCalendar(Calendar baseCalendar)` Set a new base calendar or remove the existing one.
`void` | `setDescription(String description)` Set a description for the `Calendar` instance - may be useful for remembering/displaying the purpose of the calendar, though the description has no meaning to Quartz.

Field Detail

### MONTH

    static final int MONTH

See Also:
  Constant Field Values

Method Detail

### setBaseCalendar

    void setBaseCalendar(Calendar baseCalendar)

  Set a new base calendar or remove the existing one.

### getBaseCalendar

    Calendar getBaseCalendar()

  Get the base calendar. Will be null, if not set.

### isTimeIncluded

    boolean isTimeIncluded(long timeStamp)

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

### getNextIncludedTime

    long getNextIncludedTime(long timeStamp)

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

### getDescription

    String getDescription()

  Return the description given to the `Calendar` instance by its creator (if any).

  Returns:
    null if no description was set.

### setDescription

    void setDescription(String description)

  Set a description for the `Calendar` instance - may be useful for remembering/displaying the purpose of the calendar, though the description has no meaning to Quartz.

### clone

    Object clone()

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

Copyright 2001-2013, Terracotta, Inc.