Compare attributes of pairs exactly.

        Shortcut of :class:`recordlinkage.compare.Exact`::

            from recordlinkage.compare import Exact

            indexer = recordlinkage.Compare()
            indexer.add(Exact())
517743
def exact(self, *args, **kwargs):
        
        compare = Exact(*args, **kwargs)
        self.add(compare)

        return self
546927
public boolean sameProduct(JProduct p, Map<String, String> featLinks, boolean exactContent) {
		List<JCell> tempCells = new ArrayList<>(this.cells);
		if(p.getCells().size() != this.cells.size()){
			return false;
		}
		for(JCell pC : p.getCells()){
			for(JCell thisC: this.cells){
				if(tempCells.contains(thisC)){
					if(thisC.sameCell(pC, featLinks, exactContent)){
						tempCells.remove(thisC);
					}
				}
			}
		}
//		if(tempCells.isEmpty()){
//			System.out.println(id);
//		}
		return tempCells.isEmpty();
	}
1057042
def column_types_equal(a_coltype: TypeEngine, b_coltype: TypeEngine) -> bool:
      # noqa
    return str(a_coltype) == str(b_coltype)
529279
def check(self, s, instant_exact=True):
        
        all_sets = self._get_comparison_strings(s)
        if instant_exact and s in all_sets:  # exact match
            return True

        for comparison_string in all_sets:
            if self.comparison_func(s, comparison_string) >= self.cutoff:
                return True
        return False
35335
def compare(self,
                query_classes: Set,
                reference_classes: Set,
                method: Optional) -> SimResult:
        
        raise NotImplementedError
996566
def equal_to(self, key, value):
        
        self._where[key] = utils.encode(value)
        return self
1112633
def match(self, ref):
        
        try:
            concept = self[ref]
            if not isinstance(concept, Dimension):
                return [concept]
            return [a for a in concept.attributes]
        except KeyError:
            return []
1310815
def equals(self, other):
        ''' 

        '''

        # NOTE: don't try to use this to implement __eq__. Because then
        # you will be tempted to implement __hash__, which would interfere
        # with mutability of models. However, not implementing __hash__
        # will make bokeh unusable in Python 3, where proper implementation
        # of __hash__ is required when implementing __eq__.
        if not isinstance(other, self.__class__):
            return False
        else:
            return self.properties_with_values() == other.properties_with_values()
572377
def exact_match(self):
        
        #We don't have to worry about grouping or anything else fancy. Just
        #loop through forward and back until we hit a character that can't be
        #part of a variable or function name.
        if self._exact_match is None:
            i = self.pos[1] - 1
            start = None
            end = None
            line = self.current_line
            terminators = ['(', ')', '\n', ' ', '=', '%', ',']
            while i >= 0 and start is None:
                if line[i] in terminators:
                    start = i + 1
                i -= 1

            i = self.pos[1]
            while i < len(line) and end is None:
                if line[i] in terminators:
                    end = i
                i += 1

            self._exact_match = line[start:end].lower()

        return self._exact_match
1318977
def equals_exact(self, other, tolerance):
        
        # This method cannot be delegated because it has an extra parameter
        return self._shape.equals_exact(other.get_shape(self.crs), tolerance=tolerance)
910957
def linkHasRel(link_attrs, target_rel):
    """"""
    # XXX: TESTME
    rel_attr = link_attrs.get('rel')
    return rel_attr and relMatches(rel_attr, target_rel)
344154
def _skw_matches_comparator(kw0, kw1):
    
    def compare(a, b):
        return (a > b) - (a < b)

    list_comparison = compare(len(kw1[1][0]), len(kw0[1][0]))
    if list_comparison:
        return list_comparison

    if kw0[0].isComposite() and kw1[0].isComposite():
        component_avg0 = sum(kw0[1][1]) / len(kw0[1][1])
        component_avg1 = sum(kw1[1][1]) / len(kw1[1][1])
        component_comparison = compare(component_avg1, component_avg0)
        if component_comparison:
            return component_comparison

    return compare(len(str(kw1[0])), len(str(kw0[0])))
1000802
private void doSimpleMatching() {
        for (int i = 0; i < equalElements.size(); i++) {
            if (!alreadyMatched.get(i)) {
                List<Integer> equalTo = equalElements.get(i);
                if (equalTo.size() > 0) {
                    List<Integer> equivalentElements = getEquivalentElements(equalTo);

                    // We have the same set matching as is equivalent, we can remove them all
                    if (equalTo.size() == equivalentElements.size()) {
                        for (int j = 0; j < equivalentElements.size(); j++) {
                            recordMatch(equivalentElements.get(j), equalTo.get(j));
                        }
                    } else if (equivalentElements.size() > 1 && equalTo.size() > 1) {
                        List<Integer> equalToUsedOnlyInEquivalentElements = getEqualToUsedOnlyInEquivalentElements(equalTo, equivalentElements);
                        for (int j = 0; j < min(equivalentElements.size(), equalToUsedOnlyInEquivalentElements.size()); j++) {
                            recordMatch(equivalentElements.get(j), equalTo.get(j));
                        }
                    }
                }
            }
        }
    }
175482
def add(self, tag, data=None, indicators=None, **kwargs):
        
        if tag.startswith("00") and (data is None or data == "") and not self.strict:
            return

        if data:
            if indicators:
                raise ValueError(Record.E_NO_INDICATORS)
            if not tag.startswith('00'):
                raise ValueError(Record.E_NO_DATA)
        else:
            if tag.startswith('00'):
                raise ValueError(Record.E_EMPTY)

        if tag.startswith('00') and kwargs:
            raise ValueError(Record.E_NO_SUBFIELDS)

        if indicators is None:
            indicators = [' ', ' ']
        if isinstance(indicators, basestring):
            if len(indicators) == 2:
                indicators = [indicators[0], indicators[1]]
            else:
                raise ValueError(Record.E_INVALID_INDICATOR)

        if data:  # == control field (001 -- 009)
            field = pymarc.Field(tag, data=data)
        else:     # == non-control field (010 -- 999)
            if 'subfields' in kwargs:
                sfs = kwargs['subfields']
                subfields = [v for sl in [(a, b) for a, b in zip(sfs[::2], sfs[1::2]) if b] for v in sl]
            else:
                subfields = []
                for key, value in kwargs.items():
                    if value is None:
                        continue
                    key = key.replace('_', '')
                    if isinstance(value, basestring):
                        if value == "":
                            continue
                        subfields += [key, value]
                    elif isinstance(value, collections.Iterable):
                        for val in value:
                            if not isinstance(val, basestring):
                                raise ValueError('subfield values must be strings')
                            if val:
                                subfields += [key, val]
                    else:
                        raise ValueError('subfield values must be strings')

            if not any(subfields[1::2]):
                if self.strict:
                    raise ValueError('none of the subfields contains a value')
                else:
                    return

            field = pymarc.Field(tag, indicators, subfields=subfields)
        self.add_field(field)
643491
def _compare_records(src, sink, strict=False):
    # type: (MutableMapping[Text, Any], MutableMapping[Text, Any], bool) -> bool
    

    def _rec_fields(rec):  # type: (MutableMapping[Text, Any]) -> MutableMapping[Text, Any]
        out = {}
        for field in rec["fields"]:
            name = shortname(field["name"])
            out[name] = field["type"]
        return out

    srcfields = _rec_fields(src)
    sinkfields = _rec_fields(sink)
    for key in six.iterkeys(sinkfields):
        if (not can_assign_src_to_sink(
                srcfields.get(key, "null"), sinkfields.get(key, "null"), strict)
                and sinkfields.get(key) is not None):
            _logger.info("Record comparison failure for %s and %s\n"
                         "Did not match fields for %s: %s and %s",
                         src["name"], sink["name"], key, srcfields.get(key),
                         sinkfields.get(key))
            return False
    return True
956479
def equality(self, other):
        
        # Compare specified attributes for equality
        cname = self.__class__.__name__
        for aname in self.attributes:
            try:
                attr1 = getattr(self, aname)
                attr2 = getattr(other, aname)
            except AttributeError as error:
                logging.debug("%s.%s: %s", cname, aname, error)
                return False
            self.log(attr1, attr2, '==', cname=cname, aname=aname)
            eql = (attr1 == attr2)
            self.log(attr1, attr2, '==', cname=cname, aname=aname, result=eql)
            if not eql:
                return False

        return True
758293
def identical(self, other):
        
        try:
            return (utils.dict_equiv(self.attrs, other.attrs) and
                    self.equals(other))
        except (TypeError, AttributeError):
            return False