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;
  }
  RelativeMonthlyPattern otherRelativeMonthlyPattern =
      otherRecurrence as RelativeMonthlyPattern;
  return _dayOfTheWeek == otherRelativeMonthlyPattern._dayOfTheWeek &&
      _dayOfTheWeekIndex == otherRelativeMonthlyPattern._dayOfTheWeekIndex;
}