com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class ByDay



  • public class ByDay
    extends Object

    Represents Nth occurrence (or all occurrences) of the specified day of the week.


    <p>Corresponds to one day of the week specified in the BYDAY part of a recurrence rule.</p> <p>Can be used in a monthly or yearly recurrence rule to specify Nth occurrence (or all occurrences) of the specified day of the week in a month or year.</p> <p>BYDAY=MO represents all Mondays of the month or year. To represent all occurrences, set NthOccurrence to 0.</p> <p>BYDAY=2MO represents 2nd Monday in a month or year.</p> <p>BYDAY=-1MO represents the last Monday of a month or year.</p>

    • Constructor Summary

      Constructors 
      Constructor and Description
      ByDay(int dayOfWeek)
      Initializes a new instance of ByDay class.
      ByDay(int nthOccurrence, int dayOfWeek)
      Initializes a new instance of ByDay class.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected boolean equals(ByDay other)
      Determines whether the specified ByDay is equal to this instance.
      boolean equals(Object obj)
      Determines whether the specified Object is equal to the current Object.
      int getDayOfWeek()
      Gets or sets the day of the week.
      int getNthOccurrence()
      Gets or sets the nth occurrence of the day of the week.
      int hashCode()
      GetHashCode returns a hash function for this object.
      boolean isAllOccurrences()
      Returns True when NthOccurrence is zero (meaning all occurrences of this day of week).
      void setDayOfWeek(int value)
      Gets or sets the day of the week.
      void setNthOccurrence(int value)
      Gets or sets the nth occurrence of the day of the week.
    • Constructor Detail

      • ByDay

        public ByDay(int dayOfWeek)

        Initializes a new instance of ByDay class.

        Parameters:
        dayOfWeek - A day of the week.
      • ByDay

        public ByDay(int nthOccurrence,
             int dayOfWeek)

        Initializes a new instance of ByDay class.

        Parameters:
        nthOccurrence - The nth occurrence of the day of the week.
        dayOfWeek - A day of the week.
    • Method Detail

      • getNthOccurrence

        public int getNthOccurrence()

        Gets or sets the nth occurrence of the day of the week.


        <p>Valid range for this property is from -53 to 53.</p> <p>Positive values represent Nth occurrence from the beginning of the period, for example NthOccurrence = 1, represents 1st occurrence of the day of the week.</p> <p>Negative values represent Nth occurrence from the end of the period, for example NthOccurrence = -1, represents last occurrence of the day of the week.</p> <p>When NthOccurrence is zero, it represents all occurrences of the specified day of the week. For example, BYDAY=MO has NthOccurrence zero and represents all Mondays in the set.</p>

      • setNthOccurrence

        public void setNthOccurrence(int value)

        Gets or sets the nth occurrence of the day of the week.


        <p>Valid range for this property is from -53 to 53.</p> <p>Positive values represent Nth occurrence from the beginning of the period, for example NthOccurrence = 1, represents 1st occurrence of the day of the week.</p> <p>Negative values represent Nth occurrence from the end of the period, for example NthOccurrence = -1, represents last occurrence of the day of the week.</p> <p>When NthOccurrence is zero, it represents all occurrences of the specified day of the week. For example, BYDAY=MO has NthOccurrence zero and represents all Mondays in the set.</p>

      • getDayOfWeek

        public int getDayOfWeek()

        Gets or sets the day of the week.

      • setDayOfWeek

        public void setDayOfWeek(int value)

        Gets or sets the day of the week.

      • isAllOccurrences

        public boolean isAllOccurrences()

        Returns True when NthOccurrence is zero (meaning all occurrences of this day of week).

      • equals

        protected boolean equals(ByDay other)

        Determines whether the specified ByDay is equal to this instance.

        Parameters:
        other - The ByDay to compare with this instance.
        Returns:
        true if the specified ByDay 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()

        GetHashCode returns a hash function for this object.

        Overrides:
        hashCode in class Object
        Returns:
        Returns a hash function for this object.