Enum Class RecurrenceRule.Part

java.lang.Object
java.lang.Enum<RecurrenceRule.Part>
org.dmfs.rfc5545.recur.RecurrenceRule.Part
All Implemented Interfaces:
Serializable, Comparable<RecurrenceRule.Part>, Constable
Enclosing class:
RecurrenceRule

public static enum RecurrenceRule.Part extends Enum<RecurrenceRule.Part>
Enumeration of valid recurrence rule parts. Each of these parts may occur once in a rule. FREQ is the only mandatory part.

Each part has a RecurrenceRule.ValueConverter that knows how to parse and serialize the values the part can have. Also each part has a factory method to return a RuleIterator for this part. FREQ, INTERVAL, WKST and RSCALE don't support iteration nor expansion and will throw an UnsupportedOperationException when calling getExpander(RecurrenceRule, RuleIterator, CalendarMetrics, long, TimeZone) or PartgetFilter(RecurrenceRule, CalendarMetrics).

  • Enum Constant Details

    • FREQ

      public static final RecurrenceRule.Part FREQ
      Base frequency of the recurring instances. This value is mandatory in every recurrence rule. The value must be a Freq.
    • INTERVAL

      public static final RecurrenceRule.Part INTERVAL
      The base interval of the recurring instances. If not specified the interval is 1. The value must be a positive integer.
    • RSCALE

      public static final RecurrenceRule.Part RSCALE
      RSCALE defines the calendar scale to apply. It has been introduced in http://tools.ietf.org/html/draft-daboo-icalendar-rscale-03
    • WKST

      public static final RecurrenceRule.Part WKST
      The start day of a week. The value must be a Weekday. This is relevant if any of BYDAY or BYWEEKNO are present.
    • BYMONTH

      public static final RecurrenceRule.Part BYMONTH
      A list of months that specify in which months the instances recur. The value is a list of non-zero integers. The actual values depend on the calendar scale and need to be validated after parsing.

      TODO: validate month numbers.

    • _BYMONTHSKIP

      public static final RecurrenceRule.Part _BYMONTHSKIP
      The SKIP filter for months. This must not appear in an RRULE, any attempt to parse a value will fail. This is just an implementation helper.
    • BYWEEKNO

      public static final RecurrenceRule.Part BYWEEKNO
      A list of week numbers that specify in which weeks the instances recur.

      TODO: validate week numbers

    • BYYEARDAY

      public static final RecurrenceRule.Part BYYEARDAY
      A list of year days that specify on which year days the instances recur. The actual limits depend on the calendar scale and needs to be validated after parsing. Negative values are supported only if RSCALE is present.

      TODO: validate year days

    • BYMONTHDAY

      public static final RecurrenceRule.Part BYMONTHDAY
      A list of month days on which the event recurs. Valid values are non-zero integers. The actual limits depend on the calendar scale and needs to be validated after parsing.

      TODO: validate month days

    • _BYMONTHDAYSKIP

      public static final RecurrenceRule.Part _BYMONTHDAYSKIP
      The SKIP filter for monthdays. This must not appear in an RRULE, any attempt to parse a value will fail. This is just an implementation helper.
    • BYDAY

      public static final RecurrenceRule.Part BYDAY
      A list of RecurrenceRule.WeekdayNums on which the event recurs.
    • _BYMONTH_FILTER

      public static final RecurrenceRule.Part _BYMONTH_FILTER
      A special BYMONTH filter for expander rewriting
    • _BYWEEKNO_FILTER

      public static final RecurrenceRule.Part _BYWEEKNO_FILTER
      A special BYWEEKNO filter for expander rewriting
    • _BYYEARDAY_FILTER

      public static final RecurrenceRule.Part _BYYEARDAY_FILTER
      A special BYYEARDAY filter for expander rewriting
    • _BYMONTHDAY_FILTER

      public static final RecurrenceRule.Part _BYMONTHDAY_FILTER
      A special BYMONTHDAY filter for expander rewriting
    • _BYDAY_FILTER

      public static final RecurrenceRule.Part _BYDAY_FILTER
      A special BYDAY filter for expander rewriting
    • BYHOUR

      public static final RecurrenceRule.Part BYHOUR
      The hours on which the event recurs. The value must be a list of integers in the range 0 to 23.
    • BYMINUTE

      public static final RecurrenceRule.Part BYMINUTE
      The minutes on which the event recurs. The value must be a list of integers in the range 0 to 59.
    • BYSECOND

      public static final RecurrenceRule.Part BYSECOND
      The seconds on which the event recurs. The value must be a list of integers in the range 0 to 60.
    • SKIP

      public static final RecurrenceRule.Part SKIP
      SKIP defines how to handle instances that would fall on a leap day or leap month in a non-leap year. Legal values are defined in RecurrenceRule.Skip. It has been introduced by http://tools.ietf.org/html/draft-daboo-icalendar-rscale-03

      Skipping is implemented by an expander because it might modify instances which is not supported by filters.

    • _SANITY_FILTER

      public static final RecurrenceRule.Part _SANITY_FILTER
      Filters all invalid dates. This must not appear in an RRULE, any attempt to parse a value will fail. This is just an implementation helper.
    • BYSETPOS

      public static final RecurrenceRule.Part BYSETPOS
      A list of set positions to consider when iterating the instances. The value is a list of integers. For now we accept any reasonable value.

      TODO: validate the values. They should be within the limits of byyearday.

    • UNTIL

      public static final RecurrenceRule.Part UNTIL
      This part specifies the latest date of the last instance. The value is a DateTime in UTC or the local time zone. This part is mutually exclusive with COUNT. If neither UNTIL nor COUNT are specified the instances recur forever.
    • COUNT

      public static final RecurrenceRule.Part COUNT
      This part specifies total number of instances. The value is a positive integer. This part is mutually exclusive with UNTIL. If neither COUNT nor UNTIL are specified the instances recur forever.
  • Method Details

    • values

      public static RecurrenceRule.Part[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RecurrenceRule.Part valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null