Interface DiffNodeLabelFormat<L extends Label>
- All Superinterfaces:
LinegraphFormat
- All Known Subinterfaces:
MiningNodeFormat
- All Known Implementing Classes:
DebugDiffNodeFormat,DebugMiningDiffNodeFormat,EditClassesDiffNodeFormat,FormulasAndLineNumbersNodeFormat,FullNodeFormat,IndexFormat,LabelOnlyDiffNodeFormat,LineNumberFormat,MappingsDiffNodeFormat,PaperNodeFormat,ReleaseMiningDiffNodeFormat,RenameRootNodeFormat,RWCompositePatternNodeFormat,ShowNodeFormat,TypeDiffNodeFormat
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Reads and writes
DiffNodes from and to line graph.- Author:
- Paul Bittner, Kevin Jedelhauser
-
Method Summary
Modifier and TypeMethodDescriptiondefault DiffNode<DiffLinesLabel> fromLabelAndId(String lineGraphNodeLabel, int nodeId) Converts a label of line graph into aDiffNode.default org.variantsync.functjonal.Pair<Integer, DiffNode<DiffLinesLabel>> fromLineGraphLine(String lineGraphLine) Converts a line describing a graph (starting with "t # ") in line graph format into aDiffNode.Converts aDiffNodeinto a label suitable for exporting.toMultilineLabel(DiffNode<? extends L> node) Converts aDiffNodeinto a multi line label suitable for exporting.Methods inherited from interface org.variantsync.diffdetective.variation.diff.serialize.LinegraphFormat
getIdentifier, getShortName
-
Method Details
-
fromLabelAndId
Converts a label of line graph into aDiffNode. -
toLabel
Converts aDiffNodeinto a label suitable for exporting. This may be human readable text or machine parseable metadata.- Parameters:
node- TheDiffNodeto be labeled- Returns:
- a label for
node
-
toMultilineLabel
Converts aDiffNodeinto a multi line label suitable for exporting. This should be human readable text. Use a single line for machine parseable metadata (toLabel(org.variantsync.diffdetective.variation.diff.DiffNode<? extends L>)).- Parameters:
node- TheDiffNodeto be labeled- Returns:
- a list of lines of the label for
node
-
fromLineGraphLine
default org.variantsync.functjonal.Pair<Integer,DiffNode<DiffLinesLabel>> fromLineGraphLine(String lineGraphLine) Converts a line describing a graph (starting with "t # ") in line graph format into aDiffNode.- Parameters:
lineGraphLine- A line from a line graph file starting with "t #"- Returns:
- A pair with the first element being the id of the node specified in the given lineGrapLine.
The second entry is the parsed
DiffNodedescribed by the label of this line.
-