IsSame method

  1. @override
bool IsSame(
  1. Recurrence otherRecurrence
)
override
Checks if two recurrence objects are identical. The recurrence to compare this one to.

Implementation

@override
bool IsSame(Recurrence otherRecurrence) {
  // The base check compares runtime types, so the cast below is safe.
  if (!super.IsSame(otherRecurrence)) {
    return false;
  }
  RelativeYearlyPattern otherYearlyPattern =
      otherRecurrence as RelativeYearlyPattern;
  return _dayOfTheWeek == otherYearlyPattern._dayOfTheWeek &&
      _dayOfTheWeekIndex == otherYearlyPattern._dayOfTheWeekIndex &&
      _month == otherYearlyPattern._month;
}