We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
RenameRootNodeFormat
1 parent 1ecde7d commit 29a9064Copy full SHA for 29a9064
1 file changed
src/main/java/org/variantsync/diffdetective/variation/diff/serialize/nodeformat/RenameRootNodeFormat.java
@@ -9,16 +9,22 @@
9
* @author Benjamin Moosherr
10
*/
11
public class RenameRootNodeFormat implements DiffNodeLabelFormat {
12
+ private final String rootLabel;
13
private final DiffNodeLabelFormat inner;
14
15
public RenameRootNodeFormat(DiffNodeLabelFormat inner) {
16
+ this(inner, "root");
17
+ }
18
+
19
+ public RenameRootNodeFormat(DiffNodeLabelFormat inner, String rootLabel) {
20
+ this.rootLabel = rootLabel;
21
this.inner = inner;
22
}
23
24
@Override
25
public String toLabel(final DiffNode node) {
26
if (node.isRoot()) {
- return "root";
27
+ return rootLabel;
28
} else {
29
return inner.toLabel(node);
30
0 commit comments