com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class CalendarRecurrence



  • public class CalendarRecurrence
    extends Object

    The main class, represents an iCalendar recurrence.

    • Constructor Detail

      • CalendarRecurrence

        public CalendarRecurrence()

        Initializes a new instance of the CalendarRecurrence class.

      • CalendarRecurrence

        public CalendarRecurrence(String pattern)

        Initializes a new instance of the CalendarRecurrence class.

        Parameters:
        pattern - The pattern.
    • Method Detail

      • generateOccurrences

        public DateCollection generateOccurrences()

        Generates the occurrences.

        Returns:
        Collection of datesDateCollection.
        Throws:
        com.aspose.ms.System.Exception - throws if StartDate is not set.
      • generateOccurrences

        public DateCollection generateOccurrences(int nNextOccurrences)

        Generates n next occurrences.

        Parameters:
        nNextOccurrences - The amount of needed occurrences.
        Returns:
        Collection of datesDateCollection.
        Throws:
        com.aspose.ms.System.Exception - throws if StartDate is not set.
        com.aspose.ms.System.ArgumentOutOfRangeException - throws if amount of needed occurrences is less or equal zero.
      • generateOccurrences

        public DateCollection generateOccurrences(Date rangeStart,
                                         Date rangeEnd)

        Generates the occurrences.

        Parameters:
        rangeStart - The range start.
        rangeEnd - The range end.
        Returns:
        Collection of datesDateCollection.
        Throws:
        com.aspose.ms.System.Exception - throws if StartDate is not set
      • generateOccurrences

        public DateCollection generateOccurrences(Date rangeStart,
                                         Date rangeEnd,
                                         int nNextOccurrences)

        Generates n next occurrences.

        Parameters:
        rangeStart - The range start.
        rangeEnd - The range end.
        nNextOccurrences - The amount of needed occurrences.
        Returns:
        Collection of datesDateCollection.
        Throws:
        com.aspose.ms.System.Exception - throws if StartDate is not set.
        com.aspose.ms.System.ArgumentOutOfRangeException - throws if amount of needed occurrences is less or equal zero.
      • fromiCalendar

        public static CalendarRecurrence fromiCalendar(String pattern)

        Gets a recurrence pattern from iCalendar string.

        Parameters:
        pattern - StringSystem.String representation of iCalendar.
        Returns:
        Recurrence patternCalendarRecurrence.
      • fromRecurrence

        public static CalendarRecurrence fromRecurrence(String xmlString)

        Gets a recurrence pattern from XML pattern string.

        Parameters:
        xmlString - XML stringSystem.String of pattern.
        Returns:
        Recurrence patternCalendarRecurrence.
      • fromRecurrence

        public static CalendarRecurrence fromRecurrence(Element xmlElement)

        Gets a recurrence pattern from XmlElement.

        Parameters:
        xmlElement - XmlElementSystem.Xml.XmlElement of pattern.
        Returns:
        Recurrence patternCalendarRecurrence.
      • toiCalendar

        public String toiCalendar()

        To iCalendar string.

        Returns:
        StringSystem.String representation of RecurrencePattern.
      • getStartDate

        public Date getStartDate()

        Gets or sets the start date.

        Value: The start date.
        Returns:
        a Date object.
      • setStartDate

        public void setStartDate(Date value)

        Gets or sets the start date.

        Value: The start date.
        Parameters:
        value - a Date object.
      • getEndDate

        public Date getEndDate()

        Gets or sets the end date.

        Value: The end date.
        Returns:
        a Date object.
      • setEndDate

        public void setEndDate(Date value)

        Gets or sets the end date.

        Value: The end date.
        Parameters:
        value - a Date object.
      • equals

        public boolean equals(CalendarRecurrence other)

        Determines whether the specified CalendarRecurrence is equal to this instance.

        Parameters:
        other - The CalendarRecurrence to compare with this instance.
        Returns:
        true if the specified CalendarRecurrence is equal to this instance; otherwise, false.
      • equals

        public boolean equals(Object obj)

        Determines whether the specified Object is equal to the current Object.

        Overrides:
        equals in class Object
        Parameters:
        obj - The Object to compare with the current Object.
        Returns:
        Returns a boolean indicating if the passed in object obj is Equal to this.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
      • op_Equality

        public static boolean op_Equality(CalendarRecurrence left,
                          CalendarRecurrence right)

        Implements the operator ==.

        Parameters:
        left - The left.
        right - The right.
        Returns:
        The result of the operator.
      • op_Inequality

        public static boolean op_Inequality(CalendarRecurrence left,
                            CalendarRecurrence right)

        Implements the operator !=.

        Parameters:
        left - The left.
        right - The right.
        Returns:
        The result of the operator.