|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.fortuna.ical4j.model.Recur
public class Recur
$Id$ [18-Apr-2004] Defines a recurrence.
Field Summary | |
---|---|
static String |
DAILY
Day frequency resolution. |
static String |
HOURLY
Hour frequency resolution. |
static String |
KEY_MAX_INCREMENT_COUNT
When calculating dates matching this recur ( getDates() or getNextDate ),
this property defines the maximum number of attempt to find a matching date by
incrementing the seed. |
static String |
MINUTELY
Minute frequency resolution. |
static String |
MONTHLY
Month frequency resolution. |
static String |
SECONDLY
Second frequency resolution. |
static String |
WEEKLY
Week frequency resolution. |
static String |
YEARLY
Year frequency resolution. |
Constructor Summary | |
---|---|
Recur()
Default constructor. |
|
Recur(String aValue)
Constructs a new instance from the specified string value. |
|
Recur(String frequency,
Date until)
|
|
Recur(String frequency,
int count)
|
Method Summary | |
---|---|
int |
getCount()
|
DateList |
getDates(Date seed,
Date periodStart,
Date periodEnd,
Value value)
Returns a list of start dates in the specified period represented by this recur. |
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. |
DateList |
getDates(Date periodStart,
Date periodEnd,
Value value)
Returns a list of start dates in the specified period represented by this recur. |
DateList |
getDates(Date seed,
Period period,
Value value)
Convenience method for retrieving recurrences in a specified period. |
WeekDayList |
getDayList()
|
Map |
getExperimentalValues()
|
String |
getFrequency()
|
NumberList |
getHourList()
|
int |
getInterval()
|
NumberList |
getMinuteList()
|
NumberList |
getMonthDayList()
|
NumberList |
getMonthList()
|
Date |
getNextDate(Date seed,
Date startDate)
Returns the the next date of this recurrence given a seed date and start date. |
NumberList |
getSecondList()
|
NumberList |
getSetPosList()
|
Date |
getUntil()
|
NumberList |
getWeekNoList()
|
String |
getWeekStartDay()
|
NumberList |
getYearDayList()
|
void |
setCount(int count)
|
void |
setFrequency(String frequency)
|
void |
setInterval(int interval)
|
void |
setUntil(Date until)
|
void |
setWeekStartDay(String weekStartDay)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SECONDLY
public static final String MINUTELY
public static final String HOURLY
public static final String DAILY
public static final String WEEKLY
public static final String MONTHLY
public static final String YEARLY
public static final String KEY_MAX_INCREMENT_COUNT
getDates()
or getNextDate
),
this property defines the maximum number of attempt to find a matching date by
incrementing the seed.
The default value is 1000. A value of -1 corresponds to no maximum.
Constructor Detail |
---|
public Recur()
public Recur(String aValue) throws ParseException
aValue
- a string representation of a recurrence.
ParseException
- thrown when the specified string contains an invalid representation of an UNTIL date valuepublic Recur(String frequency, Date until)
frequency
- a recurrence frequency stringuntil
- maximum recurrence datepublic Recur(String frequency, int count)
frequency
- a recurrence frequency stringcount
- maximum recurrence countMethod Detail |
---|
public final WeekDayList getDayList()
public final NumberList getHourList()
public final NumberList getMinuteList()
public final NumberList getMonthDayList()
public final NumberList getMonthList()
public final NumberList getSecondList()
public final NumberList getSetPosList()
public final NumberList getWeekNoList()
public final NumberList getYearDayList()
public final int getCount()
public final Map getExperimentalValues()
public final String getFrequency()
public final int getInterval()
public final Date getUntil()
public final String getWeekStartDay()
public final void setWeekStartDay(String weekStartDay)
weekStartDay
- The weekStartDay to set.public final String toString()
toString
in class Object
public final DateList getDates(Date periodStart, Date periodEnd, Value value)
periodStart
- the start of the periodperiodEnd
- the end of the periodvalue
- the type of dates to generate (i.e. date/date-time)
public final DateList getDates(Date seed, Period period, Value value)
seed
- a seed date for generating recurrence instancesperiod
- the period of returned recurrence datesvalue
- type of dates to generate
public final DateList getDates(Date seed, Date periodStart, Date periodEnd, Value value)
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)
public final DateList getDates(Date seed, Date periodStart, Date periodEnd, Value value, int maxCount)
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
public final Date getNextDate(Date seed, Date startDate)
seed
- the start date of this Recurrence's first instancestartDate
- the date to start the search
public final void setCount(int count)
count
- The count to set.public final void setFrequency(String frequency)
frequency
- The frequency to set.public final void setInterval(int interval)
interval
- The interval to set.public final void setUntil(Date until)
until
- The until to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |