match method

bool match(
  1. dynamic locator
)

Matches locator to this reference locator.

Descriptors are matched using equal method. All other locator types are matched using direct comparison.

  • locator the locator to match. @return true if locators are matching and false it they don't.

See Descriptor

Implementation

bool match(locator) {
  // Locate by direct reference matching
  if (_component == locator) {
    return true;
  } else if (_locator is Descriptor) {
    return _locator.equals(locator);
  } else if (_locator != null) {
    return _locator == locator;
  } else {
    return false;
  }
}