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 VElementBase
VElementBase.Message, VElementBase.MessageEffect -
Field Summary
FieldsFields inherited from class RRulePartBase
elementTypeFields inherited from class VElementBase
BEGIN, END -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate DayOfWeekStart of week - default start of week is Mondaypredicate tests value range in listener attached toRRulePartBase.getValue()Ensures added values are within allowed rangestatic ByWeekNumberstreamRecurrences(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 ByRuleIntegerAbstract
errors, parseContent, setValue, toStringMethods inherited from class RRulePartBase
equals, extractValue, getParent, getValue, hashCode, name, setParent, withValueMethods inherited from class VElementBase
elementName, isContentValid, newEmptyVElement, parse, throwMessageExceptions
-
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:ByRuleIntegerAbstractpredicate tests value range in listener attached toRRulePartBase.getValue()Ensures added values are within allowed range- Specified by:
isValidValuein classByRuleIntegerAbstract<ByWeekNumber>
-
streamRecurrences
public Stream<Temporal> streamRecurrences(Stream<Temporal> inStream, ChronoUnit chronoUnit, Temporal dateTimeStart) Description copied from interface:ByRuleNew stream of date/times made after applying rule that either filters out some date/times or adds additional date/times.- Specified by:
streamRecurrencesin interfaceByRule<List<Integer>>- Overrides:
streamRecurrencesin classByRuleAbstract<Integer, ByWeekNumber>- Parameters:
inStream- - Current stream to be added to or subtracted fromchronoUnit- - ChronoUnit of last modification to inStream- Returns:
-
parse
-