We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 207aa53 commit ed7ff62Copy full SHA for ed7ff62
1 file changed
src/main/java/org/variantsync/diffdetective/variation/Label.java
@@ -48,4 +48,18 @@ default Label withTimeDependentStateFrom(Label other, Time time) {
48
* Creates a deep copy of this label.
49
*/
50
Label clone();
51
+
52
+ /**
53
+ * Tests whether two labels are observably equal.
54
+ * Observably equal means that the two labels
55
+ * cannot be distinguished by using methods from this interface.
56
+ * The given labels might indeed be of different classes or might
57
+ * be considered unequal regarding {@link Object#equals(Object)}.
58
+ */
59
+ static boolean observablyEqual(Label a, Label b) {
60
+ if (a == null) return false;
61
+ if (a == b) return true;
62
+ return a.getLines().equals(b.getLines())
63
+ && a.getTrailingLines().equals(b.getTrailingLines());
64
+ }
65
}
0 commit comments