public final class Recurrence extends Object
Represents a recurrence rule value.
This class is immutable. Use the inner class Recurrence.Builder to construct a
new instance.
Code sample:
Recurrence rrule = new Recurrence.Builder(Frequency.WEEKLY).interval(2).build(); Recurrence copy = new Recurrence.Builder(rrule).interval(3).build();
| Modifier and Type | Class and Description |
|---|---|
static class |
Recurrence.Builder
Constructs
Recurrence objects. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<ByDay> |
getByDay()
Gets the day components of the BYDAY rule part.
|
List<Integer> |
getByHour()
Gets the BYHOUR rule part.
|
List<Integer> |
getByMinute()
Gets the BYMINUTE rule part.
|
List<Integer> |
getByMonth()
Gets the BYMONTH rule part.
|
List<Integer> |
getByMonthDay()
Gets the BYMONTHDAY rule part.
|
List<Integer> |
getBySecond()
Gets the BYSECOND rule part.
|
List<Integer> |
getBySetPos()
Gets the BYSETPOS rule part.
|
List<Integer> |
getByWeekNo()
Gets the BYWEEKNO rule part.
|
List<Integer> |
getByYearDay()
Gets the BYYEARDAY rule part.
|
Integer |
getCount()
Gets the number of times the rule will be repeated.
|
DateIterator |
getDateIterator(Date startDate,
TimeZone timezone)
Creates an iterator that computes the dates defined by this recurrence.
|
DateIterator |
getDateIterator(ICalDate startDate,
TimeZone timezone)
Creates an iterator that computes the dates defined by this recurrence.
|
Frequency |
getFrequency()
Gets the frequency.
|
Integer |
getInterval()
Gets how often the rule repeats, in relation to the frequency.
|
ICalDate |
getUntil()
Gets the date that the recurrence stops.
|
DayOfWeek |
getWorkweekStarts()
Gets the day that the work week starts.
|
Map<String,List<String>> |
getXRules()
Gets the non-standard rule parts.
|
int |
hashCode() |
public Frequency getFrequency()
public ICalDate getUntil()
public Integer getCount()
public Integer getInterval()
public List<Integer> getBySecond()
public List<Integer> getByMinute()
public List<Integer> getByHour()
public List<ByDay> getByDay()
public List<Integer> getByMonthDay()
public List<Integer> getByYearDay()
public List<Integer> getByWeekNo()
public List<Integer> getByMonth()
public List<Integer> getBySetPos()
public DayOfWeek getWorkweekStarts()
public Map<String,List<String>> getXRules()
public DateIterator getDateIterator(Date startDate, TimeZone timezone)
startDate - the date that the recurrence starts (typically, the
value of the DateStart property)timezone - the timezone to iterate in (typically, the timezone
associated with the DateStart property). This is needed in order
to adjust for when the iterator passes over a daylight savings boundary.public DateIterator getDateIterator(ICalDate startDate, TimeZone timezone)
startDate - the date that the recurrence starts (typically, the
value of the DateStart property)timezone - the timezone to iterate in (typically, the timezone
associated with the DateStart property). This is needed in order
to adjust for when the iterator passes over a daylight savings boundary.Copyright © 2013–2024 Michael Angstadt. All rights reserved.