Skip to content

Commit d8d90e7

Browse files
committed
First Relevant Implemented
1 parent 28cd996 commit d8d90e7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

DoubleEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ private void runQualtricsDEVL() {
327327
saveOption = 1;
328328
}
329329
s = new QualtricsSurvey(file, new Delimiter("[\\t]", "\t", "\n"), indexColumn, doublePrefix);
330-
logic = new QualtricsDEVL(s, saveOption);
330+
logic = new QualtricsDEVL(s, saveOption, relevantColumn);
331331
} catch (Exception e) {
332332
appendStatus("\nFailed to run QualtricsDEVL.\n");
333333
System.out.println("runQualtricsDEVL(): " + e);

QualtricsDEVL.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ public class QualtricsDEVL extends DoubleEntryValidationLogic {
1515
private int idKey;
1616
private int numSaved;
1717
private int saveOption;
18+
private int firstRelevant;
1819
private Delimiter delim;
1920
private Survey s;
2021

21-
public QualtricsDEVL(Survey s, int saveOption) {
22+
public QualtricsDEVL(Survey s, int saveOption, int firstRelevant) {
2223
this.s = s;
2324
this.saveOption = saveOption;
2425
this.delim = this.s.getDelimiter();
2526
this.numSaved = 0;
27+
this.firstRelevant = firstRelevant;
2628
this.results = new StringBuilder();
2729
this.idKey = this.s.getIndex();
2830
if (this.idKey > this.s.getHeaderColumnLength()) {
@@ -98,7 +100,7 @@ private void printOffending(String originalEntry, String doubleEntry) {
98100
String secondValue = second.columnData(i);
99101
boolean foundMismatch = false;
100102

101-
if (i != this.idKey && i < maxReach) {
103+
if (i != this.idKey && i < maxReach && i >= this.firstRelevant) {
102104
if (!firstValue.equals(secondValue)) {
103105
foundMismatch = true;
104106
if (savedSomething == false) {

0 commit comments

Comments
 (0)