Home » quartz-1.6.0 » org » quartz » impl » calendar » [javadoc | source]
org.quartz.impl.calendar
public class: WeeklyCalendar [javadoc | source]
java.lang.Object
   org.quartz.impl.calendar.BaseCalendar
      org.quartz.impl.calendar.WeeklyCalendar

All Implemented Interfaces:
    Serializable, Calendar

This implementation of the Calendar excludes a set of days of the week. You may use it to exclude weekends for example. But you may define any day of the week. By default it excludes SATURDAY and SUNDAY.

Field Summary
static final  long serialVersionUID     
Fields inherited from org.quartz.impl.calendar.BaseCalendar:
serialVersionUID
Constructor:
 public WeeklyCalendar() 
 public WeeklyCalendar(Calendar baseCalendar) 
 public WeeklyCalendar(TimeZone timeZone) 
 public WeeklyCalendar(Calendar baseCalendar,
    TimeZone timeZone) 
Method from org.quartz.impl.calendar.WeeklyCalendar Summary:
areAllDaysExcluded,   getDaysExcluded,   getNextIncludedTime,   isDayExcluded,   isTimeIncluded,   setDayExcluded,   setDaysExcluded
Methods from org.quartz.impl.calendar.BaseCalendar:
buildHoliday,   buildHoliday,   createJavaCalendar,   createJavaCalendar,   getBaseCalendar,   getDescription,   getEndOfDayJavaCalendar,   getJavaCalendar,   getNextIncludedTime,   getStartOfDayJavaCalendar,   getTimeZone,   isTimeIncluded,   setBaseCalendar,   setDescription,   setTimeZone
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.impl.calendar.WeeklyCalendar Detail:
 public boolean areAllDaysExcluded() 

    Check if all week days are excluded. That is no day is included.

 public boolean[] getDaysExcluded() 

    Get the array with the week days

 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.

 public boolean isDayExcluded(int wday) 

    Return true, if wday (see Calendar.get()) is defined to be exluded. E. g. saturday and sunday.

 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.

 public  void setDayExcluded(int wday,
    boolean exclude) 

    Redefine a certain day of the week to be excluded (true) or included (false). Use java.util.Calendar's constants like MONDAY to determine the wday.

 public  void setDaysExcluded(boolean[] weekDays) 

    Redefine the array of days excluded. The array must of size greater or equal 8. java.util.Calendar's constants like MONDAY should be used as index. A value of true is regarded as: exclude it.