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;
  }
  YearlyPattern otherYearlyPattern = otherRecurrence as YearlyPattern;
  return _month == otherYearlyPattern._month &&
      _dayOfMonth == otherYearlyPattern._dayOfMonth;
}