public class Recur<T extends Temporal> extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Recur.Builder<T extends Temporal>
Support for building Recur instances.
|
static class |
Recur.Frequency |
Modifier and Type | Field and Description |
---|---|
static String |
DAILY
Deprecated.
use
Recur.Frequency instead. |
static String |
HOURLY
Deprecated.
use
Recur.Frequency instead. |
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
Deprecated.
use
Recur.Frequency instead. |
static String |
MONTHLY
Deprecated.
use
Recur.Frequency instead. |
static String |
SECONDLY
Deprecated.
use
Recur.Frequency instead. |
static String |
WEEKLY
Deprecated.
use
Recur.Frequency instead. |
static String |
YEARLY
Deprecated.
use
Recur.Frequency instead. |
Constructor and Description |
---|
Recur(Recur.Frequency frequency,
int count) |
Recur(Recur.Frequency frequency,
T until) |
Recur(String aValue)
Constructs a new instance from the specified string value.
|
Recur(String frequency,
int count)
Deprecated.
|
Recur(String frequency,
T until)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
getCount() |
List<T> |
getDates(T seed,
Period<T> period)
Convenience method for retrieving recurrences in a specified period.
|
List<T> |
getDates(T periodStart,
T periodEnd)
Returns a list of start dates in the specified period represented by this recur.
|
List<T> |
getDates(T seed,
T periodStart,
T periodEnd)
Returns a list of start dates in the specified period represented by this recur.
|
List<T> |
getDates(T seed,
T periodStart,
T periodEnd,
int maxCount)
Returns a list of start dates in the specified period represented by this recur.
|
WeekDayList |
getDayList()
Accessor for the configured BYDAY list.
|
Map<String,String> |
getExperimentalValues() |
Recur.Frequency |
getFrequency() |
NumberList |
getHourList()
Accessor for the configured BYHOUR list.
|
int |
getInterval() |
NumberList |
getMinuteList()
Accessor for the configured BYMINUTE list.
|
NumberList |
getMonthDayList()
Accessor for the configured BYMONTHDAY list.
|
NumberList |
getMonthList()
Accessor for the configured BYMONTH list.
|
T |
getNextDate(T seed,
T startDate)
Returns the the next date of this recurrence given a seed date
and start date.
|
NumberList |
getSecondList()
Accessor for the configured BYSECOND list.
|
NumberList |
getSetPosList()
Accessor for the configured BYSETPOS list.
|
T |
getUntil() |
NumberList |
getWeekNoList()
Accessor for the configured BYWEEKNO list.
|
WeekDay |
getWeekStartDay() |
NumberList |
getYearDayList()
Accessor for the configured BYYEARDAY list.
|
void |
setCount(int count)
Deprecated.
will be removed in a future version to support immutable pattern.
|
void |
setFrequency(String frequency)
Deprecated.
will be removed in a future version to support immutable pattern.
|
void |
setInterval(int interval)
Deprecated.
will be removed in a future version to support immutable pattern.
|
void |
setUntil(T until)
Deprecated.
will be removed in a future version to support immutable pattern.
|
void |
setWeekStartDay(WeekDay weekStartDay)
Deprecated.
will be removed in a future version to support immutable pattern.
|
String |
toString() |
@Deprecated public static final String SECONDLY
Recur.Frequency
instead.@Deprecated public static final String MINUTELY
Recur.Frequency
instead.@Deprecated public static final String HOURLY
Recur.Frequency
instead.@Deprecated public static final String DAILY
Recur.Frequency
instead.@Deprecated public static final String WEEKLY
Recur.Frequency
instead.@Deprecated public static final String MONTHLY
Recur.Frequency
instead.@Deprecated public static final String YEARLY
Recur.Frequency
instead.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.
public Recur(String aValue)
aValue
- a string representation of a recurrence.@Deprecated public Recur(String frequency, T until)
frequency
- a recurrence frequency stringuntil
- maximum recurrence datepublic Recur(Recur.Frequency frequency, T until)
frequency
- a recurrence frequency stringuntil
- maximum recurrence date@Deprecated public Recur(String frequency, int count)
frequency
- a recurrence frequency stringcount
- maximum recurrence countpublic Recur(Recur.Frequency frequency, int count)
frequency
- a recurrence frequency stringcount
- maximum recurrence countpublic 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<String,String> getExperimentalValues()
public final Recur.Frequency getFrequency()
public final int getInterval()
public final T getUntil()
public final WeekDay getWeekStartDay()
@Deprecated public final void setWeekStartDay(WeekDay weekStartDay)
weekStartDay
- The weekStartDay to set.public final List<T> getDates(T periodStart, T periodEnd)
periodStart
- the start of the periodperiodEnd
- the end of the periodpublic final List<T> getDates(T seed, Period<T> period)
seed
- a seed date for generating recurrence instancesperiod
- the period of returned recurrence datespublic final List<T> getDates(T seed, T periodStart, T periodEnd)
seed
- the start date of this Recurrence's first instanceperiodStart
- the start of the periodperiodEnd
- the end of the periodpublic final List<T> getDates(T seed, T periodStart, T periodEnd, int maxCount)
seed
- the start date of this Recurrence's first instanceperiodStart
- the start of the periodperiodEnd
- the end of the periodmaxCount
- limits the number of instances returned. Up to one years
worth extra may be returned. Less than 0 means no limitpublic final T getNextDate(T seed, T startDate)
seed
- the start date of this Recurrence's first instancestartDate
- the date to start the search@Deprecated public final void setCount(int count)
count
- The count to set.@Deprecated public final void setFrequency(String frequency)
frequency
- The frequency to set.@Deprecated public final void setInterval(int interval)
interval
- The interval to set.@Deprecated public final void setUntil(T until)
until
- The until to set.