public class RecurrenceRule2 extends VParentBase implements VChild
RRULE Recurrence Rule RFC 5545 iCalendar 3.3.10 page 38
Contains the following Recurrence Rule elements: COUNT UNTIL FREQUENCY INTERVAL BYxxx RULES in a List
The value part of the recurrence rule. It supports the following elements: <br> ( "FREQ" "=" freq ) <br> ( "UNTIL" "=" enddate ) <br> ( "COUNT" "=" 1*DIGIT ) <br> ( "INTERVAL" "=" 1*DIGIT ) <br> ( "BYSECOND" "=" byseclist ) <br> ( "BYMINUTE" "=" byminlist ) <br> ( "BYHOUR" "=" byhrlist ) <br> ( "BYDAY" "=" bywdaylist ) <br> ( "BYMONTHDAY" "=" bymodaylist ) <br> ( "BYYEARDAY" "=" byyrdaylist ) <br> ( "BYWEEKNO" "=" bywknolist ) <br> ( "BYMONTH" "=" bymolist ) <br> ( "BYSETPOS" "=" bysplist ) <br> ( "WKST" "=" weekday ) <br>
In addition to methods to support iCalendar recurrence rule parts, there is a method
streamRecurrences(Temporal)
that produces a stream of start date/times for the recurrences
defined by the rule.
RecurrenceRule
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<Count> |
count
COUNT:
RFC 5545 iCalendar 3.3.10, page 41
|
javafx.beans.property.ObjectProperty<Frequency> |
frequency
FREQUENCY
FREQ
RFC 5545 iCalendar 3.3.10 p40
|
javafx.beans.property.ObjectProperty<Interval> |
interval
INTERVAL
RFC 5545 iCalendar 3.3.10, page 40
|
javafx.beans.property.SimpleObjectProperty<Until> |
until
UNTIL:
RFC 5545 iCalendar 3.3.10, page 41
|
javafx.beans.property.SimpleObjectProperty<WeekStart> |
weekStart
Week Start
WKST:
RFC 5545 iCalendar 3.3.10, page 42
|
Constructor and Description |
---|
RecurrenceRule2() |
RecurrenceRule2(RecurrenceRule2 source) |
Modifier and Type | Method and Description |
---|---|
javafx.collections.ObservableList<ByRule<?>> |
byRules()
BYxxx Rules
RFC 5545, iCalendar 3.3.10 Page 42
|
void |
copyInto(VParent destination)
|
protected javafx.util.Callback<VChild,java.lang.Void> |
copyIntoCallback()
Deprecated.
|
javafx.beans.property.ObjectProperty<Count> |
countProperty()
COUNT:
RFC 5545 iCalendar 3.3.10, page 41
|
java.util.List<java.lang.String> |
errors()
Produces a list of error messages indicating problems with calendar element
VElement.errors() is invoked recursively to return errors of child elements in addition to errors in parent |
javafx.beans.property.ObjectProperty<Frequency> |
frequencyProperty()
FREQUENCY
FREQ
RFC 5545 iCalendar 3.3.10 p40
|
Count |
getCount() |
Frequency |
getFrequency() |
Interval |
getInterval() |
VParent |
getParent()
|
Until |
getUntil() |
WeekStart |
getWeekStart() |
javafx.beans.property.ObjectProperty<Interval> |
intervalProperty()
INTERVAL
RFC 5545 iCalendar 3.3.10, page 40
|
boolean |
isInfinite()
Determines if recurrence set is goes on forever
|
ByRule<?> |
lookupByRule(java.lang.Class<? extends ByRule<?>> byRuleClass)
Return ByRule associated with class type
|
java.lang.String |
name()
<p>Returns the name of the component as it would appear in the iCalendar content line.</p>
<p>Examples:
<ul>
<li>VEVENT
<li>SUMMARY
<li>LANGUAGE
</ul>
</p>
|
static RecurrenceRule2 |
parse(java.lang.String propertyContent) |
java.util.List<java.lang.String> |
parseContent(java.lang.String contentLine)
Parse component from content line
|
void |
setCount(Count count) |
void |
setCount(int count) |
void |
setFrequency(Frequency frequency) |
void |
setFrequency(FrequencyType frequency) |
void |
setFrequency(java.lang.String frequency) |
void |
setInterval(java.lang.Integer interval) |
void |
setInterval(Interval interval) |
void |
setParent(VParent parent)
|
void |
setUntil(java.lang.String until) |
void |
setUntil(java.time.temporal.Temporal until) |
void |
setUntil(Until until) |
void |
setWeekStart(java.time.DayOfWeek weekStart) |
void |
setWeekStart(WeekStart weekStart) |
java.util.stream.Stream<java.time.temporal.Temporal> |
streamRecurrences(java.time.temporal.Temporal start)
STREAM RECURRENCES
|
java.lang.String |
toContent()
Returns iCalendar content text.
|
java.lang.String |
toString() |
javafx.beans.property.SimpleObjectProperty<Until> |
untilProperty()
UNTIL:
RFC 5545 iCalendar 3.3.10, page 41
|
javafx.beans.property.SimpleObjectProperty<WeekStart> |
weekStartProperty()
Week Start
WKST:
RFC 5545 iCalendar 3.3.10, page 42
|
RecurrenceRule2 |
withByRules(ByRule<?>... byRules) |
RecurrenceRule2 |
withByRules(java.lang.String... byRules) |
RecurrenceRule2 |
withCount(Count count) |
RecurrenceRule2 |
withCount(int count) |
RecurrenceRule2 |
withFrequency(Frequency frequency) |
RecurrenceRule2 |
withFrequency(FrequencyType frequency) |
RecurrenceRule2 |
withFrequency(java.lang.String frequency) |
RecurrenceRule2 |
withInterval(int interval) |
RecurrenceRule2 |
withInterval(Interval interval) |
RecurrenceRule2 |
withUntil(java.lang.String until) |
RecurrenceRule2 |
withUntil(java.time.temporal.Temporal until) |
RecurrenceRule2 |
withUntil(Until until) |
RecurrenceRule2 |
withWeekStart(java.time.DayOfWeek weekStart) |
RecurrenceRule2 |
withWeekStart(WeekStart weekStart) |
childrenUnmodifiable, equals, hashCode, orderer, setContentLineGenerator
public javafx.beans.property.ObjectProperty<Count> countProperty
COUNT: RFC 5545 iCalendar 3.3.10, page 41
The COUNT rule part defines the number of occurrences at which to range-bound the recurrence. The "DTSTART" property value always counts as the first occurrence.
getCount()
,
setCount(Count)
public javafx.beans.property.ObjectProperty<Frequency> frequencyProperty
FREQUENCY FREQ RFC 5545 iCalendar 3.3.10 p40
required element
The FREQ rule part identifies the type of recurrence rule. This rule part MUST be specified in the recurrence rule. Valid values include SECONDLY, to specify repeating events based on an interval of a second or more; MINUTELY, to specify repeating events based on an interval of a minute or more; HOURLY, to specify repeating events based on an interval of an hour or more; DAILY, to specify repeating events based on an interval of a day or more; WEEKLY, to specify repeating events based on an interval of a week or more; MONTHLY, to specify repeating events based on an interval of a month or more; and YEARLY, to specify repeating events based on an interval of a year or more.
getFrequency()
,
setFrequency(Frequency)
public javafx.beans.property.ObjectProperty<Interval> intervalProperty
INTERVAL RFC 5545 iCalendar 3.3.10, page 40
The INTERVAL rule part contains a positive integer representing at which intervals the recurrence rule repeats. The default value is "1", meaning every second for a SECONDLY rule, every minute for a MINUTELY rule, every hour for an HOURLY rule, every day for a DAILY rule, every week for a WEEKLY rule, every month for a MONTHLY rule, and every year for a YEARLY rule. For example, within a DAILY rule, a value of "8" means every eight days.
getInterval()
,
setInterval(Interval)
public javafx.beans.property.SimpleObjectProperty<Until> untilProperty
UNTIL: RFC 5545 iCalendar 3.3.10, page 41
The UNTIL rule part defines a DATE or DATE-TIME value that bounds the recurrence rule in an inclusive manner. If the value specified by UNTIL is synchronized with the specified recurrence, this DATE or DATE-TIME becomes the last instance of the recurrence. The value of the UNTIL rule part MUST have the same value type as the "DTSTART" property. Furthermore, if the "DTSTART" property is specified as a date with local time, then the UNTIL rule part MUST also be specified as a date with local time. If the "DTSTART" property is specified as a date with UTC time or a date with local time and time zone reference, then the UNTIL rule part MUST be specified as a date with UTC time. In the case of the "STANDARD" and "DAYLIGHT" sub-components the UNTIL rule part MUST always be specified as a date with UTC time. If specified as a DATE-TIME value, then it MUST be specified in a UTC time format. If not present, and the COUNT rule part is also not present, the "RRULE" is considered to repeat forever
getUntil()
,
setUntil(Until)
public javafx.beans.property.SimpleObjectProperty<WeekStart> weekStartProperty
Week Start WKST: RFC 5545 iCalendar 3.3.10, page 42
The WKST rule part specifies the day on which the workweek starts. Valid values are MO, TU, WE, TH, FR, SA, and SU. This is significant when a WEEKLY "RRULE" has an interval greater than 1, and a BYDAY rule part is specified. This is also significant when in a YEARLY "RRULE" when a BYWEEKNO rule part is specified. The default value is MO.
getWeekStart()
,
setWeekStart(WeekStart)
public RecurrenceRule2()
public RecurrenceRule2(RecurrenceRule2 source)
public java.lang.String name()
VElement
<p>Returns the name of the component as it would appear in the iCalendar content line.</p> <p>Examples: <ul> <li>VEVENT <li>SUMMARY <li>LANGUAGE </ul> </p>
public javafx.collections.ObservableList<ByRule<?>> byRules()
BYxxx Rules RFC 5545, iCalendar 3.3.10 Page 42
List contains any of the following. The following list also indicates the processing order:
ByMonth
ByWeekNo
ByYearDay
ByMonthDay
ByDay
ByHour
ByMinute
BySecond
BySetPos
BYxxx rules modify the recurrence set by either expanding or limiting it.
Each BYxxx rule can only occur once
public RecurrenceRule2 withByRules(ByRule<?>... byRules)
public RecurrenceRule2 withByRules(java.lang.String... byRules)
public ByRule<?> lookupByRule(java.lang.Class<? extends ByRule<?>> byRuleClass)
Return ByRule associated with class type
public javafx.beans.property.ObjectProperty<Count> countProperty()
COUNT: RFC 5545 iCalendar 3.3.10, page 41
The COUNT rule part defines the number of occurrences at which to range-bound the recurrence. The "DTSTART" property value always counts as the first occurrence.
getCount()
,
setCount(Count)
public Count getCount()
public void setCount(Count count)
public void setCount(int count)
public RecurrenceRule2 withCount(Count count)
public RecurrenceRule2 withCount(int count)
public javafx.beans.property.ObjectProperty<Frequency> frequencyProperty()
FREQUENCY FREQ RFC 5545 iCalendar 3.3.10 p40
required element
The FREQ rule part identifies the type of recurrence rule. This rule part MUST be specified in the recurrence rule. Valid values include SECONDLY, to specify repeating events based on an interval of a second or more; MINUTELY, to specify repeating events based on an interval of a minute or more; HOURLY, to specify repeating events based on an interval of an hour or more; DAILY, to specify repeating events based on an interval of a day or more; WEEKLY, to specify repeating events based on an interval of a week or more; MONTHLY, to specify repeating events based on an interval of a month or more; and YEARLY, to specify repeating events based on an interval of a year or more.
getFrequency()
,
setFrequency(Frequency)
public Frequency getFrequency()
public void setFrequency(Frequency frequency)
public void setFrequency(java.lang.String frequency)
public void setFrequency(FrequencyType frequency)
public RecurrenceRule2 withFrequency(Frequency frequency)
public RecurrenceRule2 withFrequency(java.lang.String frequency)
public RecurrenceRule2 withFrequency(FrequencyType frequency)
public javafx.beans.property.ObjectProperty<Interval> intervalProperty()
INTERVAL RFC 5545 iCalendar 3.3.10, page 40
The INTERVAL rule part contains a positive integer representing at which intervals the recurrence rule repeats. The default value is "1", meaning every second for a SECONDLY rule, every minute for a MINUTELY rule, every hour for an HOURLY rule, every day for a DAILY rule, every week for a WEEKLY rule, every month for a MONTHLY rule, and every year for a YEARLY rule. For example, within a DAILY rule, a value of "8" means every eight days.
getInterval()
,
setInterval(Interval)
public Interval getInterval()
public void setInterval(Interval interval)
public void setInterval(java.lang.Integer interval)
public RecurrenceRule2 withInterval(int interval)
public RecurrenceRule2 withInterval(Interval interval)
public javafx.beans.property.SimpleObjectProperty<Until> untilProperty()
UNTIL: RFC 5545 iCalendar 3.3.10, page 41
The UNTIL rule part defines a DATE or DATE-TIME value that bounds the recurrence rule in an inclusive manner. If the value specified by UNTIL is synchronized with the specified recurrence, this DATE or DATE-TIME becomes the last instance of the recurrence. The value of the UNTIL rule part MUST have the same value type as the "DTSTART" property. Furthermore, if the "DTSTART" property is specified as a date with local time, then the UNTIL rule part MUST also be specified as a date with local time. If the "DTSTART" property is specified as a date with UTC time or a date with local time and time zone reference, then the UNTIL rule part MUST be specified as a date with UTC time. In the case of the "STANDARD" and "DAYLIGHT" sub-components the UNTIL rule part MUST always be specified as a date with UTC time. If specified as a DATE-TIME value, then it MUST be specified in a UTC time format. If not present, and the COUNT rule part is also not present, the "RRULE" is considered to repeat forever
getUntil()
,
setUntil(Until)
public Until getUntil()
public void setUntil(Until until)
public void setUntil(java.time.temporal.Temporal until)
public void setUntil(java.lang.String until)
public RecurrenceRule2 withUntil(java.time.temporal.Temporal until)
public RecurrenceRule2 withUntil(java.lang.String until)
public RecurrenceRule2 withUntil(Until until)
public javafx.beans.property.SimpleObjectProperty<WeekStart> weekStartProperty()
Week Start WKST: RFC 5545 iCalendar 3.3.10, page 42
The WKST rule part specifies the day on which the workweek starts. Valid values are MO, TU, WE, TH, FR, SA, and SU. This is significant when a WEEKLY "RRULE" has an interval greater than 1, and a BYDAY rule part is specified. This is also significant when in a YEARLY "RRULE" when a BYWEEKNO rule part is specified. The default value is MO.
getWeekStart()
,
setWeekStart(WeekStart)
public WeekStart getWeekStart()
public void setWeekStart(WeekStart weekStart)
public void setWeekStart(java.time.DayOfWeek weekStart)
public RecurrenceRule2 withWeekStart(WeekStart weekStart)
public RecurrenceRule2 withWeekStart(java.time.DayOfWeek weekStart)
@Deprecated protected javafx.util.Callback<VChild,java.lang.Void> copyIntoCallback()
VParentBase
Strategy to copy subclass’s children This method MUST be overridden in subclasses
copyIntoCallback
in class VParentBase
public void copyInto(VParent destination)
VParent
copyInto
in interface VParent
copyInto
in class VParentBase
public java.util.List<java.lang.String> parseContent(java.lang.String contentLine)
Parse component from content line
parseContent
in interface VElement
contentLine
- calendar content string to parsepublic java.util.stream.Stream<java.time.temporal.Temporal> streamRecurrences(java.time.temporal.Temporal start)
STREAM RECURRENCES
Resulting stream of start date/times by applying Frequency temporal adjuster and all, if any,
Starts on startDateTime, which MUST be a valid occurrence date/time, but not necessarily the first date/time (DTSTART) in the sequence. A later startDateTime can be used to more efficiently get to later dates in the stream.
start
- - starting point of stream (MUST be a valid occurrence date/time)public boolean isInfinite()
Determines if recurrence set is goes on forever
public java.lang.String toContent()
VElement
Returns iCalendar content text.
toContent
in interface VElement
toContent
in class VParentBase
public java.util.List<java.lang.String> errors()
VElement
Produces a list of error messages indicating problems with calendar element
VElement.errors()
is invoked recursively to return errors of child elements in addition to errors in parent
errors
in interface VElement
errors
in class VParentBase
public java.lang.String toString()
toString
in class java.lang.Object
public static RecurrenceRule2 parse(java.lang.String propertyContent)