Class DiffNodeLabelPrettyfier
java.lang.Object
org.variantsync.diffdetective.variation.diff.serialize.nodeformat.DiffNodeLabelPrettyfier
Making methods accessible for
DiffNodeLabelFormat for formatting the output of DiffNodes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringprettyPrintIfAnnotationOr(DiffNode<?> node, String elseValue) InvokesprettyPrintTypeAndMapping(DiffNode)if the given nodeis an annotation, and returns the elseValue otherwise.private static StringprettyPrintTypeAndMapping(DiffNode<?> node) Auxiliary method forprettyPrintIfAnnotationOr(DiffNode, String).
-
Constructor Details
-
DiffNodeLabelPrettyfier
public DiffNodeLabelPrettyfier()
-
-
Method Details
-
prettyPrintTypeAndMapping
Auxiliary method forprettyPrintIfAnnotationOr(DiffNode, String). Returns a string starting with the nodesDiffNode.getNodeType(), and itsDiffNode.getFormula()if it has a formula.- Parameters:
node- TheDiffNodeto print.- Returns:
- NodeType and
DiffNode.getFormula()of the node in a single string, seperated by a space character.
-
prettyPrintIfAnnotationOr
InvokesprettyPrintTypeAndMapping(DiffNode)if the given nodeis an annotation, and returns the elseValue otherwise.- Parameters:
node- TheDiffNodeto prettyprint.elseValue- The value to return in case the given node is not an annotation.- Returns:
- The generated label.
-