private int countFieldMatches(Tuple<Type.Field> lhsFields, Tuple<Type.Field> rhsFields) {
		int matches = 0;
		for (int i = 0; i != lhsFields.size(); ++i) {
			Type.Field lhsField = lhsFields.get(i);
			Identifier lhsFieldName = lhsField.getName();
			for (int j = 0; j != rhsFields.size(); ++j) {
				Type.Field rhsField = rhsFields.get(j);
				Identifier rhsFieldName = rhsField.getName();
				if (lhsFieldName.equals(rhsFieldName)) {
					matches++;
					break;
				}
			}
		}
		return matches;
	}
private int countFieldMatches ( Tuple < Type . Field > lhsFields , Tuple < Type . Field > rhsFields ) { int matches = 0 ; for ( int i = 0 ; i != lhsFields . size ( ) ; ++ i ) { Type . Field lhsField = lhsFields . get ( i ) ; Identifier lhsFieldName = lhsField . getName ( ) ; for ( int j = 0 ; j != rhsFields . size ( ) ; ++ j ) { Type . Field rhsField = rhsFields . get ( j ) ; Identifier rhsFieldName = rhsField . getName ( ) ; if ( lhsFieldName . equals ( rhsFieldName ) ) { matches ++ ; break ; } } } return matches ; }
Simply count the number of fields in the lhs which match a field in the rhs.
This provides critical information. For example, when subtracting
<code>{int f, int g}</code> from <code>{int f, int h}</code> it is apparent
that not all fields in the lhs are matched.

@param lhsFields
@param rhsFields
@return