Module jfxtras.icalendarfx
Class ByWeekNumber
java.lang.Object
jfxtras.icalendarfx.VElementBase
jfxtras.icalendarfx.properties.component.recurrence.rrule.RRulePartBase<List<Integer>,ByWeekNumber>
jfxtras.icalendarfx.properties.component.recurrence.rrule.byxxx.ByRuleAbstract<Integer,ByWeekNumber>
jfxtras.icalendarfx.properties.component.recurrence.rrule.byxxx.ByRuleIntegerAbstract<ByWeekNumber>
jfxtras.icalendarfx.properties.component.recurrence.rrule.byxxx.ByWeekNumber
- All Implemented Interfaces:
Comparable<ByRule<List<Integer>>>
,ByRule<List<Integer>>
,RRulePart<List<Integer>>
,VChild
,VElement
By Week Number
BYWEEKNO
RFC 5545, iCalendar 3.3.10, page 42
The BYWEEKNO rule part specifies a COMMA-separated list of
ordinals specifying weeks of the year. Valid values are 1 to 53
or -53 to -1. This corresponds to weeks according to week
numbering as defined in [ISO.8601.2004]. A week is defined as a
seven day period, starting on the day of the week defined to be
the week start (see WKST). Week number one of the calendar year
is the first week that contains at least four (4) days in that
calendar year. This rule part MUST NOT be used when the FREQ rule
part is set to anything other than YEARLY. For example, 3
represents the third week of the year.
Note: Assuming a Monday week start, week 53 can only occur when
Thursday is January 1 or if it is a leap year and Wednesday is
January 1.
-
Nested Class Summary
Nested classes/interfaces inherited from class jfxtras.icalendarfx.VElementBase
VElementBase.Message, VElementBase.MessageEffect
-
Field Summary
FieldsFields inherited from class jfxtras.icalendarfx.properties.component.recurrence.rrule.RRulePartBase
elementType
Fields inherited from class jfxtras.icalendarfx.VElementBase
BEGIN, END
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate DayOfWeek
Start of week - default start of week is Mondaypredicate tests value range in listener attached toRRulePartBase.getValue()
Ensures added values are within allowed rangestatic ByWeekNumber
streamRecurrences
(Stream<Temporal> inStream, ChronoUnit chronoUnit, Temporal dateTimeStart) New stream of date/times made after applying rule that either filters out some date/times or adds additional date/times.Methods inherited from class jfxtras.icalendarfx.properties.component.recurrence.rrule.byxxx.ByRuleIntegerAbstract
errors, parseContent, setValue, toString
Methods inherited from class jfxtras.icalendarfx.properties.component.recurrence.rrule.byxxx.ByRuleAbstract
compareTo, setValue, setValue, withValue, withValue
Methods inherited from class jfxtras.icalendarfx.properties.component.recurrence.rrule.RRulePartBase
equals, extractValue, getParent, getValue, hashCode, name, setParent, withValue
Methods inherited from class jfxtras.icalendarfx.VElementBase
elementName, isContentValid, newEmptyVElement, parse, throwMessageExceptions
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
MIN_DAYS_IN_WEEK
private static final int MIN_DAYS_IN_WEEK- See Also:
-
-
Constructor Details
-
ByWeekNumber
public ByWeekNumber() -
ByWeekNumber
-
ByWeekNumber
-
-
Method Details
-
getWeekStart
Start of week - default start of week is Monday -
isValidValue
Description copied from class:ByRuleIntegerAbstract
predicate tests value range in listener attached toRRulePartBase.getValue()
Ensures added values are within allowed range- Specified by:
isValidValue
in classByRuleIntegerAbstract<ByWeekNumber>
-
streamRecurrences
public Stream<Temporal> streamRecurrences(Stream<Temporal> inStream, ChronoUnit chronoUnit, Temporal dateTimeStart) Description copied from interface:ByRule
New stream of date/times made after applying rule that either filters out some date/times or adds additional date/times.- Specified by:
streamRecurrences
in interfaceByRule<List<Integer>>
- Overrides:
streamRecurrences
in classByRuleAbstract<Integer,
ByWeekNumber> - Parameters:
inStream
- - Current stream to be added to or subtracted fromchronoUnit
- - ChronoUnit of last modification to inStream- Returns:
-
parse
-