Module jfxtras.icalendarfx
Class RecurrenceRuleValue
java.lang.Object
jfxtras.icalendarfx.VElementBase
jfxtras.icalendarfx.VParentBase<RecurrenceRuleValue>
jfxtras.icalendarfx.properties.component.recurrence.rrule.RecurrenceRuleValue
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:
( "FREQ" "=" freq )
( "UNTIL" "=" enddate )
( "COUNT" "=" 1*DIGIT )
( "INTERVAL" "=" 1*DIGIT )
( "BYSECOND" "=" byseclist )
( "BYMINUTE" "=" byminlist )
( "BYHOUR" "=" byhrlist )
( "BYDAY" "=" bywdaylist )
( "BYMONTHDAY" "=" bymodaylist )
( "BYYEARDAY" "=" byyrdaylist )
( "BYWEEKNO" "=" bywknolist )
( "BYMONTH" "=" bymolist )
( "BYSETPOS" "=" bysplist )
( "WKST" "=" weekday )
In addition to methods to support iCalendar recurrence rule parts, there is a method
( "FREQ" "=" freq )
( "UNTIL" "=" enddate )
( "COUNT" "=" 1*DIGIT )
( "INTERVAL" "=" 1*DIGIT )
( "BYSECOND" "=" byseclist )
( "BYMINUTE" "=" byminlist )
( "BYHOUR" "=" byhrlist )
( "BYDAY" "=" bywdaylist )
( "BYMONTHDAY" "=" bymodaylist )
( "BYYEARDAY" "=" byyrdaylist )
( "BYWEEKNO" "=" bywknolist )
( "BYMONTH" "=" bymolist )
( "BYSETPOS" "=" bysplist )
( "WKST" "=" weekday )
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.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jfxtras.icalendarfx.VElementBase
VElementBase.Message, VElementBase.MessageEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChronoUnit
private Count
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.private Frequency
FREQUENCY FREQ RFC 5545 iCalendar 3.3.10 p40 required element The FREQ rule part identifies the type of recurrence rule.private Interval
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.private VParent
private static final String
private Until
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.private WeekStart
Week Start WKST: RFC 5545 iCalendar 3.3.10, page 42 The WKST rule part specifies the day on which the workweek starts.Fields inherited from class jfxtras.icalendarfx.VParentBase
contentLineGenerator, orderer
Fields inherited from class jfxtras.icalendarfx.VElementBase
BEGIN, END
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkChild
(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) errors()
Produces a list of error messages indicating problems with calendar elementVElement.errors()
is invoked recursively to return errors of child elements in addition to errors in parentBYxxx Rules RFC 5545, iCalendar 3.3.10 Page 42 List contains any of the following.getCount()
protected Method
protected Method
getUntil()
boolean
Determines if recurrence set is goes on foreverByRule<?>
lookupByRule
(Class<ByDay> class1) Return particular ByRule of passed classname()
Returns the name of the component as it would appear in the iCalendar content line.static RecurrenceRuleValue
protected List<VElementBase.Message>
parseContent
(String contentLine) Parse component from content linevoid
setByRules
(String... byRules) void
setByRules
(List<ByRule<?>> byRules) void
setCount
(int count) void
void
setFrequency
(String frequency) void
setFrequency
(Frequency frequency) void
setFrequency
(FrequencyType frequency) void
setInterval
(Integer interval) void
setInterval
(Interval interval) void
void
void
void
void
setWeekStart
(DayOfWeek weekStart) void
setWeekStart
(WeekStart weekStart) streamRecurrences
(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.(package private) static <T> Spliterator<T>
takeWhile
(Spliterator<T> splitr, Predicate<? super T> predicate) (package private) static <T> Stream<T>
toString()
withByRules
(String... byRules) withByRules
(Collection<ByRule<?>> byRules) withByRules
(ByRule<?>... byRules) withCount
(int count) withFrequency
(String frequency) withFrequency
(Frequency frequency) withFrequency
(FrequencyType frequency) withInterval
(int interval) withInterval
(Interval interval) withWeekStart
(DayOfWeek weekStart) withWeekStart
(WeekStart weekStart) Methods inherited from class jfxtras.icalendarfx.VParentBase
addChild, addChild, addChild, addChildInternal, childrenUnmodifiable, collectGetterMap, collectSetterMap, copyChildrenInto, equals, getGetters, getSetters, hashCode, orderChild, orderChild, orderChild, parseContent, processInLineChild, removeChild, removeChild, replaceChild, replaceChild, withChild
Methods inherited from class jfxtras.icalendarfx.VElementBase
elementName, isContentValid, newEmptyVElement, parse, throwMessageExceptions
-
Field Details
-
myParent
-
NAME
- See Also:
-
byRules
-
count
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. -
frequency
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 oparseContentr 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. -
interval
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. -
until
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 -
weekStart
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. -
chronoUnit
-
myStream
-
-
Constructor Details
-
RecurrenceRuleValue
public RecurrenceRuleValue() -
RecurrenceRuleValue
-
-
Method Details
-
setParent
Description copied from interface:VChild
-
getParent
Description copied from interface:VChild
-
name
Description copied from interface:VElement
Returns the name of the component as it would appear in the iCalendar content line.
Examples:
- VEVENT
- SUMMARY
- LANGUAGE
-
getByRules
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 -
setByRules
-
setByRules
-
withByRules
-
withByRules
-
withByRules
-
lookupByRule
Return particular ByRule of passed class -
getCount
-
setCount
-
setCount
public void setCount(int count) -
withCount
-
withCount
-
getFrequency
-
setFrequency
-
setFrequency
-
setFrequency
-
withFrequency
-
withFrequency
-
withFrequency
-
getInterval
-
setInterval
-
setInterval
-
withInterval
-
withInterval
-
getUntil
-
setUntil
-
setUntil
-
setUntil
-
withUntil
-
withUntil
-
withUntil
-
getWeekStart
-
setWeekStart
-
setWeekStart
-
withWeekStart
-
withWeekStart
-
getSetter
- Overrides:
getSetter
in classVParentBase<RecurrenceRuleValue>
-
getGetter
- Overrides:
getGetter
in classVParentBase<RecurrenceRuleValue>
-
parseContent
Parse component from content line- Overrides:
parseContent
in classVParentBase<RecurrenceRuleValue>
- Parameters:
contentLine
- calendar content string to parse- Returns:
- log of information and error messages
-
streamRecurrences
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.- Parameters:
start
- - starting point of stream (MUST be a valid occurrence date/time)- Returns:
-
isInfinite
public boolean isInfinite()Determines if recurrence set is goes on forever- Returns:
- - true if recurrence set is infinite, false otherwise
-
takeWhile
-
takeWhile
-
toString
- Overrides:
toString
in classVParentBase<RecurrenceRuleValue>
-
errors
Description copied from interface:VElement
Produces a list of error messages indicating problems with calendar elementVElement.errors()
is invoked recursively to return errors of child elements in addition to errors in parent- Specified by:
errors
in interfaceVElement
- Overrides:
errors
in classVParentBase<RecurrenceRuleValue>
- Returns:
- - list of error messages
-
checkChild
protected boolean checkChild(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) - Overrides:
checkChild
in classVParentBase<RecurrenceRuleValue>
-
parse
-