Module jfxtras.icalendarfx
Class RecurrenceRuleCache
java.lang.Object
jfxtras.icalendarfx.properties.component.recurrence.RecurrenceRuleCache
Handles caching an array of Temporal date/time values to speed up producing a stream
of recurrence instances for a recurrence rule (RRULE).
RFC 5545 3.8.5.2, page 121
The recurrence set is the complete set of recurrence instances for a calendar component.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
int
int
private VRepeatable<?>
private Temporal
private RecurrenceRuleValue
private int
Temporal[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClosestStart
(Temporal targetStart) Returns the previous start date/time value of the recurrence set on or before targetStart in the cache.add to cache while streaming recurrencespreviousValue
(Temporal value) finds previous value in recurrence set before input parameter value
-
Field Details
-
CACHE_RANGE
private static final int CACHE_RANGE- See Also:
-
CACHE_SKIP
private static final int CACHE_SKIP- See Also:
-
skipCounter
private int skipCounter -
temporalCache
-
dateTimeStartLast
-
rRuleLast
-
cacheStart
public int cacheStart -
cacheEnd
public int cacheEnd -
component
-
-
Constructor Details
-
RecurrenceRuleCache
-
-
Method Details
-
previousValue
finds previous value in recurrence set before input parameter value- Parameters:
value
- - start value- Returns:
- - previous recurrence instance
-
getClosestStart
Returns the previous start date/time value of the recurrence set on or before targetStart in the cache. If no value is present in the cache then the DTSTART value is returned. This value is guaranteed to be a valid recurrence date/time. It can be used as a starting point for calculating future recurrences more efficiently than using DTSTART.- Parameters:
targetStart
- - target date/time to get previous recurrence.- Returns:
- closest recurrence DTSTART value, without going over.
-
makeCache
add to cache while streaming recurrences
-