Project

General

Profile

1
package eu.dnetlib.pace.condition;
2

    
3
import java.util.List;
4

    
5
import eu.dnetlib.pace.model.FieldDef;
6
import eu.dnetlib.pace.model.FieldList;
7

    
8
/**
9
 * The Class ExactMatch.
10
 * 
11
 * @author claudio
12
 */
13
public class ExactMatch extends AbstractCondition {
14

    
15
	public ExactMatch(final List<FieldDef> fields) {
16
		super(fields);
17
	}
18

    
19
	@Override
20
	protected int verify(final FieldDef fd, final FieldList a, final FieldList b) {
21

    
22
		String fa = getFirstValue(a);
23
		String fb = getFirstValue(b);
24

    
25
		return fa.equals(fb) ? 1 : -1;
26
	}
27

    
28
}
(4-4/7)