$Id: Recur.java,v 1.44 2009/01/06 08:14:50 fortuna Exp $ [18-Apr-2004]
Defines a recurrence.
DAILY
public static final String DAILY
HOURLY
public static final String HOURLY
MINUTELY
public static final String MINUTELY
MONTHLY
public static final String MONTHLY
SECONDLY
public static final String SECONDLY
WEEKLY
public static final String WEEKLY
YEARLY
public static final String YEARLY
getCount
public final int getCount()
getDates
public final DateList getDates(Date seed,
Date periodStart,
Date periodEnd,
Value value)
Returns a list of start dates in the specified period represented by this recur. This method includes a base date
argument, which indicates the start of the fist occurrence of this recurrence. The base date is used to inject
default values to return a set of dates in the correct format. For example, if the search start date (start) is
Wed, Mar 23, 12:19PM, but the recurrence is Mon - Fri, 9:00AM - 5:00PM, the start dates returned should all be at
9:00AM, and not 12:19PM.
seed
- the start date of this Recurrence's first instanceperiodStart
- the start of the periodperiodEnd
- the end of the periodvalue
- the type of dates to generate (i.e. date/date-time)
- a list of dates represented by this recur instance
getDates
public final DateList getDates(Date seed,
Date periodStart,
Date periodEnd,
Value value,
int maxCount)
Returns a list of start dates in the specified period represented by this recur. This method includes a base date
argument, which indicates the start of the fist occurrence of this recurrence. The base date is used to inject
default values to return a set of dates in the correct format. For example, if the search start date (start) is
Wed, Mar 23, 12:19PM, but the recurrence is Mon - Fri, 9:00AM - 5:00PM, the start dates returned should all be at
9:00AM, and not 12:19PM.
seed
- the start date of this Recurrence's first instanceperiodStart
- the start of the periodperiodEnd
- the end of the periodvalue
- the type of dates to generate (i.e. date/date-time)maxCount
- limits the number of instances returned. Up to one years
worth extra may be returned. Less than 0 means no limit
- a list of dates represented by this recur instance
getDates
public final DateList getDates(Date periodStart,
Date periodEnd,
Value value)
Returns a list of start dates in the specified period represented by this recur. Any date fields not specified by
this recur are retained from the period start, and as such you should ensure the period start is initialised
correctly.
periodStart
- the start of the periodperiodEnd
- the end of the periodvalue
- the type of dates to generate (i.e. date/date-time)
getDates
public final DateList getDates(Date seed,
Period period,
Value value)
Convenience method for retrieving recurrences in a specified period.
period
- the period of returned recurrence datesvalue
- type of dates to generate
getDayList
public final WeekDayList getDayList()
getExperimentalValues
public final Map getExperimentalValues()
- Returns the experimentalValues.
getFrequency
public final String getFrequency()
getHourList
public final NumberList getHourList()
getInterval
public final int getInterval()
getMinuteList
public final NumberList getMinuteList()
getMonthDayList
public final NumberList getMonthDayList()
- Returns the monthDayList.
getMonthList
public final NumberList getMonthList()
getNextDate
public final Date getNextDate(Date seed,
Date startDate)
Returns the the next date of this recurrence given a seed date
and start date. The seed date indicates the start of the fist
occurrence of this recurrence. The start date is the
starting date to search for the next recurrence. Return null
if there is no occurrence date after start date.
seed
- the start date of this Recurrence's first instancestartDate
- the date to start the search
- the next date in the recurrence series after startDate
getSecondList
public final NumberList getSecondList()
getSetPosList
public final NumberList getSetPosList()
getUntil
public final Date getUntil()
getWeekNoList
public final NumberList getWeekNoList()
getWeekStartDay
public final String getWeekStartDay()
- Returns the weekStartDay.
getYearDayList
public final NumberList getYearDayList()
setCount
public final void setCount(int count)
count
- The count to set.
setFrequency
public final void setFrequency(String frequency)
frequency
- The frequency to set.
setInterval
public final void setInterval(int interval)
interval
- The interval to set.
setUntil
public final void setUntil(Date until)
until
- The until to set.
setWeekStartDay
public final void setWeekStartDay(String weekStartDay)
weekStartDay
- The weekStartDay to set.
toString
public final String toString()
java.lang.Object.toString()