Class EKRecurrenceRule

  • All Implemented Interfaces:
    NSCopying, NSObject

    public class EKRecurrenceRule
    extends EKObject
    implements NSCopying
    EKRecurrenceRule Represents how an event repeats. This class describes the recurrence pattern for a repeating event. The recurrence rules that can be expressed are not restricted to the recurrence patterns that can be set in Calendar's UI. It is currently not possible to directly modify a EKRecurrenceRule or any of its properties. This functionality is achieved by creating a new EKRecurrenceRule, and setting an event to use the new rule. When a new recurrence rule is set on an EKEvent, that change is not saved until the client has passed the modified event to EKEventStore's saveEvent: method.
    • Constructor Detail

      • EKRecurrenceRule

        protected EKRecurrenceRule​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • calendarIdentifier

        public java.lang.String calendarIdentifier()
        [@property] calendarIdentifier; Calendar used by this recurrence rule.
      • copyWithZone

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • daysOfTheMonth

        public NSArray<? extends NSNumber> daysOfTheMonth()
        [@property] daysOfTheMonth This property is valid for rules whose EKRecurrenceFrequency is EKRecurrenceFrequencyMonthly, and that were initialized with one or more specific days of the month (not with a day of the week and week of the month). This property can be accessed as an array containing one or more NSNumbers corresponding to the days of the month the event recurs. For all other EKRecurrenceRules, this property is nil. This property corresponds to BYMONTHDAY in the iCalendar specification.
      • daysOfTheWeek

        public NSArray<? extends EKRecurrenceDayOfWeek> daysOfTheWeek()
        [@property] daysOfTheWeek This property is valid for rules whose EKRecurrenceFrequency is EKRecurrenceFrequencyWeekly, EKRecurrenceFrequencyMonthly, or EKRecurrenceFrequencyYearly. This property can be accessed as an array containing one or more EKRecurrenceDayOfWeek objects corresponding to the days of the week the event recurs. For all other EKRecurrenceRules, this property is nil. This property corresponds to BYDAY in the iCalendar specification.
      • daysOfTheYear

        public NSArray<? extends NSNumber> daysOfTheYear()
        [@property] daysOfTheYear This property is valid for rules whose EKRecurrenceFrequency is EKRecurrenceFrequencyYearly. This property can be accessed as an array containing one or more NSNumbers corresponding to the days of the year the event recurs. For all other EKRecurrenceRules, this property is nil. This property corresponds to BYYEARDAY in the iCalendar specification. It should contain values between 1 to 366 or -366 to -1.
      • firstDayOfTheWeek

        public long firstDayOfTheWeek()
        [@property] firstDayOfTheWeek Recurrence patterns can specify which day of the week should be treated as the first day. Possible values for this property are integers 0 and 1-7, which correspond to days of the week with Sunday = 1. Zero indicates that the property is not set for this recurrence. The first day of the week only affects the way the recurrence is expanded for weekly recurrence patterns with an interval greater than 1. For those types of recurrence patterns, the Calendar framework will set firstDayOfTheWeek to be 2 (Monday). In all other cases, this property will be set to zero. The iCalendar spec stipulates that the default value is Monday if this property is not set.
      • frequency

        public long frequency()
        [@property] frequency This property designates the unit of time used to describe the recurrence pattern.
      • initRecurrenceWithFrequencyIntervalDaysOfTheWeekDaysOfTheMonthMonthsOfTheYearWeeksOfTheYearDaysOfTheYearSetPositionsEnd

        public EKRecurrenceRule initRecurrenceWithFrequencyIntervalDaysOfTheWeekDaysOfTheMonthMonthsOfTheYearWeeksOfTheYearDaysOfTheYearSetPositionsEnd​(long type,
                                                                                                                                                        long interval,
                                                                                                                                                        NSArray<? extends EKRecurrenceDayOfWeek> days,
                                                                                                                                                        NSArray<? extends NSNumber> monthDays,
                                                                                                                                                        NSArray<? extends NSNumber> months,
                                                                                                                                                        NSArray<? extends NSNumber> weeksOfTheYear,
                                                                                                                                                        NSArray<? extends NSNumber> daysOfTheYear,
                                                                                                                                                        NSArray<? extends NSNumber> setPositions,
                                                                                                                                                        EKRecurrenceEnd end)
        initRecurrenceWithFrequency:interval:daysOfTheWeek:daysOfTheMonth:monthsOfTheYear:weeksOfTheYear:daysOfTheYear:setPositions:end: The designated initializer. This can be used to build any kind of recurrence rule. But be aware that certain combinations make no sense and will be ignored. For example, if you pass daysOfTheWeek for a daily recurrence, they will be ignored.
        Parameters:
        type - The type of recurrence
        interval - The interval. Passing zero will raise an exception.
        daysOfTheWeek - An array of EKRecurrenceDayOfWeek objects. Valid for all recurrence types except daily. Ignored otherwise. Corresponds to the BYDAY value in the iCalendar specification.
        daysOfTheMonth - An array of NSNumbers ([+/-] 1 to 31). Negative numbers infer counting from the end of the month. For example, -1 means the last day of the month. Valid only for monthly recurrences. Ignored otherwise. Corresponds to the BYMONTHDAY value in the iCalendar specification.
        monthsOfTheYear - An array of NSNumbers (1 to 12). Valid only for yearly recurrences. Ignored otherwise. Corresponds to the BYMONTH value in the iCalendar specification.
        weeksOfTheYear - An array of NSNumbers ([+/1] 1 to 53). Negative numbers infer counting from the end of the year. For example, -1 means the last week of the year. Valid only for yearly recurrences. Ignored otherwise. Corresponds to the BYWEEKNO value in the iCalendar specification.
        daysOfTheYear - An array of NSNumbers ([+/1] 1 to 366). Negative numbers infer counting from the end of the year. For example, -1 means the last day of the year. Valid only for yearly recurrences. Ignored otherwise. Corresponds to the BYYEARDAY value in the iCalendar specification.
        setPositions - An array of NSNumbers ([+/1] 1 to 366). Used at the end of recurrence computation to filter the list to the positions specified. Negative numbers indicate starting at the end, i.e. -1 indicates taking the last result of the set. Valid when daysOfTheWeek, daysOfTheMonth, monthsOfTheYear, weeksOfTheYear, or daysOfTheYear is passed. Ignored otherwise. Corresponds to the BYSETPOS value in the iCalendar specification.
        end - The recurrence end, or nil.
      • initRecurrenceWithFrequencyIntervalEnd

        public EKRecurrenceRule initRecurrenceWithFrequencyIntervalEnd​(long type,
                                                                       long interval,
                                                                       EKRecurrenceEnd end)
        initRecurrenceWithFrequency:interval:end: Simple initializer to create a recurrence. This is used to create a simple recurrence with a specific type, interval and end. If interval is 0, an exception is raised. The end parameter can be nil.
      • interval

        public long interval()
        [@property] interval The interval of a EKRecurrenceRule is an integer value which specifies how often the recurrence rule repeats over the unit of time described by the EKRecurrenceFrequency. For example, if the EKRecurrenceFrequency is EKRecurrenceWeekly, then an interval of 1 means the pattern is repeated every week. A value of 2 indicates it is repeated every other week, 3 means every third week, and so on. The value must be a positive integer; 0 is not a valid value, and nil will be returned if the client attempts to initialize a rule with a negative or zero interval.
      • monthsOfTheYear

        public NSArray<? extends NSNumber> monthsOfTheYear()
        [@property] monthsOfTheYear This property is valid for rules whose EKRecurrenceFrequency is EKRecurrenceFrequencyYearly. This property can be accessed as an array containing one or more NSNumbers corresponding to the months of the year the event recurs. For all other EKRecurrenceRules, this property is nil. This property corresponds to BYMONTH in the iCalendar specification.
      • recurrenceEnd

        public EKRecurrenceEnd recurrenceEnd()
        [@property] recurrenceEnd This property defines when the the repeating event is scheduled to end. The end date can be specified by a number of occurrences, or with an end date.
      • setPositions

        public NSArray<? extends NSNumber> setPositions()
        [@property] setPositions This property is valid for rules which have a valid daysOfTheWeek, daysOfTheMonth, weeksOfTheYear, or monthsOfTheYear property. It allows you to specify a set of ordinal numbers to help choose which objects out of the set of selected events should be included. For example, setting the daysOfTheWeek to Monday-Friday and including a value of -1 in the array would indicate the last weekday in the recurrence range (month, year, etc). This value corresponds to the iCalendar BYSETPOS property.
      • setRecurrenceEnd

        public void setRecurrenceEnd​(EKRecurrenceEnd value)
        [@property] recurrenceEnd This property defines when the the repeating event is scheduled to end. The end date can be specified by a number of occurrences, or with an end date.
      • weeksOfTheYear

        public NSArray<? extends NSNumber> weeksOfTheYear()
        [@property] weeksOfTheYear This property is valid for rules whose EKRecurrenceFrequency is EKRecurrenceFrequencyYearly. This property can be accessed as an array containing one or more NSNumbers corresponding to the weeks of the year the event recurs. For all other EKRecurrenceRules, this property is nil. This property corresponds to BYWEEK in the iCalendar specification. It should contain integers from 1 to 53 or -1 to -53.