]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.core/src/main/java/org/argeo/slc/diff/DiffMissing.java
Introduce DiffMissingXml
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / diff / DiffMissing.java
1 package org.argeo.slc.diff;
2
3 /**
4 * A value missing in one of the file. If its position is related to expected,
5 * this means it is a left over in the reached, if its position is related to
6 * the reached it means that it is missing from the reached. If the value is
7 * null it means that the entire line is missing.
8 */
9 public class DiffMissing extends DiffIssue {
10 private final DiffKey key;
11
12 public DiffMissing(DiffPosition position, DiffKey key) {
13 super(position);
14 this.key = key;
15 }
16
17 public Object getKey() {
18 return key;
19 }
20
21 @Override
22 public String toString() {
23 if (position.relatedFile == RelatedFile.EXPECTED) {
24 return position + ": left over " + key;
25 } else if (position.relatedFile == RelatedFile.REACHED) {
26 return position + ": missing " + key;
27 }
28 return super.toString();
29 }
30
31 }