Compares each field of the name one at a time to see if they match.
        Each name field has context-specific comparison logic.

        :param Name other: other Name for comparison
        :return int: sequence ratio match (out of 100)
764723
def ratio_deep_compare(self, other, settings):
        

        if not self._is_compatible_with(other):
            return 0

        first, middle, last = self._compare_components(other, settings, True)
        f_weight, m_weight, l_weight = self._determine_weights(other, settings)
        total_weight = f_weight + m_weight + l_weight

        result = (
            first * f_weight +
            middle * m_weight +
            last * l_weight
        ) / total_weight

        return result
1040070
public int compareTo(DurationField otherField) {
        long otherMillis = otherField.getUnitMillis();
        long thisMillis = getUnitMillis();
        // cannot do (thisMillis - otherMillis) as can overflow
        if (thisMillis == otherMillis) {
            return 0;
        }
        if (thisMillis < otherMillis) {
            return -1;
        } else {
            return 1;
        }
    }
923066
def identical(self, other):
        
        try:
            return (self.name == other.name and
                    self._all_compat(other, 'identical'))
        except (TypeError, AttributeError):
            return False
188414
def _check_names_match(data_names, data_shapes, name, throw):
    """"""
    actual = [x[0] for x in data_shapes]
    if sorted(data_names) != sorted(actual):
        msg = "Data provided by %s_shapes don't match names specified by %s_names (%s vs. %s)"%(
            name, name, str(data_shapes), str(data_names))
        if throw:
            raise ValueError(msg)
        else:
            warnings.warn(msg)
805480
def matches_pattern(self, other):
        
        properties = self._message_properties()
        ismatch = False
        if isinstance(other, Message) and self.code == other.code:
            for prop in properties:
                for key, prop_val in prop.items():
                    if hasattr(other, key):
                        key_val = getattr(other, key)
                        ismatch = self._test_match(prop_val, key_val)
                    else:
                        ismatch = False
                    if not ismatch:
                        break
                if not ismatch:
                    break
        return ismatch
1192867
def hasField(self, name):
        
        if self._autoFixNames:
            name = self._fixName(name)
        return self._fieldAttrDict.has_key(name)
14832
def is_equal(self, other):
        
        if not isinstance(other, DictCell):
            return False
        for (this, that) in itertools.izip_longest(self, other):
            if this[0] != that[0]:
                # compare key names
                return False
            if not this[1].is_equal(that[1]):
                # compare cells
                return False
        return True
601686
def _name_matches(name, matches):
    '''
    
    '''
    for m in matches:
        if name.endswith(m):
            return True
        if name.lower().endswith('_' + m.lower()):
            return True
        if name.lower() == m.lower():
            return True
    return False
748603
def sgt(self, other):
        
        self._check_match(other)
        return self.to_sint() > other.to_sint()
624669
def match(self, other):
        
        if self.sub_type != '*' and other.sub_type != '*' and other.sub_type != self.sub_type:
            return False

        if self.main_type != '*' and other.main_type != '*' and other.main_type != self.main_type:
            return False

        return True
209469
public boolean equalsExact(Ort other) {
        return Objects.equals(this.plz, other.plz) && this.name.equals(other.name);
    }
149000
def equals(self, other):
        
        if isinstance(other, RangeIndex):
            ls = len(self)
            lo = len(other)
            return (ls == lo == 0 or
                    ls == lo == 1 and
                    self._start == other._start or
                    ls == lo and
                    self._start == other._start and
                    self._step == other._step)

        return super().equals(other)
895988
public boolean matches(T other) {
    if (matchAny) {
      return true;
    } else if (other == null) {
      return negation ? value != null : value == null;
    } else {
      if (value instanceof byte[]) {
        boolean equal = Arrays.equals((byte[]) value, (byte[]) other);
        return negation ? !equal : equal;
      }
      return negation ? !Objects.equals(value, other) : Objects.equals(value, other);
    }
110693
def name_matches(self, name: str) -> bool:
        
        return bool(self.regex.match(name))
1245890
public int compareTo (Name other)
    {
        Integer override = overrideCompareTo(other);
        if (override != null) {
            return override;
        } else if ((override = other.overrideCompareTo(this)) != null) {
            return -override;
        }
        Class<?> c = getClass();
        Class<?> oc = other.getClass();
        if (c == oc || c.getName().equals(oc.getName())) {
            return getNormal().compareTo(other.getNormal());
        } else {
            return c.getName().compareTo(oc.getName());
        }
    }
446138
@Override
    public int compareTo(final AnnotationParameterValue other) {
        if (other == this) {
            return 0;
        }
        final int diff = name.compareTo(other.getName());
        if (diff != 0) {
            return diff;
        }
        if (value.equals(other.value)) {
            return 0;
        }
        // Use toString() order (which can be slow) as a last-ditch effort -- only happens
        // if the annotation has multiple parameters of the same name but different value. 
        final Object p0 = getValue();
        final Object p1 = other.getValue();
        return p0 == null || p1 == null ? (p0 == null ? 0 : 1) - (p1 == null ? 0 : 1)
                : toStringParamValueOnly().compareTo(other.toStringParamValueOnly());
    }
1062206
def _get_other_names(self, line):
        
        m = re.search(self.compound_regex['other_names'][0], line, re.IGNORECASE)
        if m:
            self.other_names.append(m.group(1).strip())