match method

bool match(
  1. RouteMask other
)

Implementation

bool match(RouteMask other) {
  if (other._segments.length != _segments.length) {
    return false;
  }

  for (int i = 0; i < _segments.length; i++) {
    if (_segments[i].mask) {
      continue;
    }

    if (_segments[i].name != other._segments[i].name) {
      return false;
    }
  }

  return true;
}