|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.quartz.impl.calendar Class AnnualCalendar
java.lang.Object org.quartz.impl.calendar.BaseCalendar org.quartz.impl.calendar.AnnualCalendar
- All Implemented Interfaces:
- Serializable, Cloneable, Calendar
public class AnnualCalendar
- extends BaseCalendar
- implements Calendar, Serializable
This implementation of the Calendar excludes a set of days of the year. You may use it to exclude bank holidays which are on the same date every year.
- Author:
- Juergen Donnerstag
- See Also:
Calendar
,BaseCalendar
, Serialized Form
Field Summary |
---|
Fields inherited from interface org.quartz.Calendar |
---|
MONTH |
Constructor Summary | |
---|---|
AnnualCalendar()
|
|
AnnualCalendar(Calendar baseCalendar)
|
|
AnnualCalendar(Calendar baseCalendar,
TimeZone timeZone)
|
|
AnnualCalendar(TimeZone timeZone)
|
Method Summary | |
---|---|
Object |
clone()
|
ArrayList<Calendar> |
getDaysExcluded()
Get the array which defines the exclude-value of each day of month |
long |
getNextIncludedTime(long timeStamp)
Determine the next time (in milliseconds) that is 'included' by the Calendar after the given time. |
boolean |
isDayExcluded(Calendar day)
Return true, if day is defined to be exluded. |
boolean |
isTimeIncluded(long timeStamp)
Determine whether the given time (in milliseconds) is 'included' by the Calendar. |
void |
removeExcludedDay(Calendar day)
Remove the given day from the list of excluded days |
void |
setDayExcluded(Calendar day,
boolean exclude)
Redefine a certain day to be excluded (true) or included (false). |
void |
setDaysExcluded(ArrayList days)
Redefine the list of days excluded. |
Methods inherited from class org.quartz.impl.calendar.BaseCalendar |
---|
createJavaCalendar, createJavaCalendar, getBaseCalendar, getDescription, getEndOfDayJavaCalendar, getStartOfDayJavaCalendar, getTimeZone, setBaseCalendar, setDescription, setTimeZone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.quartz.Calendar |
---|
getBaseCalendar, getDescription, setBaseCalendar, setDescription |
Constructor Detail |
---|
AnnualCalendar
public AnnualCalendar()
AnnualCalendar
public AnnualCalendar(Calendar baseCalendar)
AnnualCalendar
public AnnualCalendar(TimeZone timeZone)
AnnualCalendar
public AnnualCalendar(Calendar baseCalendar, TimeZone timeZone)
Method Detail |
---|
clone
public Object clone()
- Specified by:
clone
in interfaceCalendar
- Overrides:
clone
in classBaseCalendar
getDaysExcluded
public ArrayList<Calendar> getDaysExcluded()
Get the array which defines the exclude-value of each day of month
isDayExcluded
public boolean isDayExcluded(Calendar day)
Return true, if day is defined to be exluded.
setDaysExcluded
public void setDaysExcluded(ArrayList days)
Redefine the list of days excluded. The ArrayList should contain
java.util.Calendar
objects.
setDayExcluded
public void setDayExcluded(Calendar day, boolean exclude)
Redefine a certain day to be excluded (true) or included (false).
removeExcludedDay
public void removeExcludedDay(Calendar day)
- Remove the given day from the list of excluded days
- Parameters:
day
-
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 interfaceCalendar
- Overrides:
isTimeIncluded
in classBaseCalendar
- 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. Return the original value if timeStamp is included. Return 0 if all days are excluded.
Note that this Calendar is only has full-day precision.
- Specified by:
getNextIncludedTime
in interfaceCalendar
- Overrides:
getNextIncludedTime
in classBaseCalendar
- See Also:
Calendar.getNextIncludedTime(long)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2001-2011, Terracotta, Inc.