Record Class TextDiffToTikz
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.internal.TextDiffToTikz
public record TextDiffToTikz(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thecollapseMultipleCodeLinesrecord component.private static final Format<DiffLinesLabel> Format used for the test export.private final booleanThe field for theignoreEmptyLinesrecord component.static String[] -
Constructor Summary
ConstructorsConstructorDescriptionTextDiffToTikz(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates an instance of aTextDiffToTikzrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecollapseMultipleCodeLinesrecord component.final booleanIndicates whether some other object is "equal to" this one.static StringexportAsTikz(VariationDiff<DiffLinesLabel> variationDiff, GraphvizExporter.LayoutAlgorithm layout) final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreEmptyLinesrecord component.static voidstatic StringsubstringBefore(String str, Pattern end) voidtextDiff2Tikz(Path fileToConvert, GraphvizExporter.LayoutAlgorithm layout) static StringtikzNodeLabel(DiffNode<? extends DiffLinesLabel> node) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
collapseMultipleCodeLines
private final boolean collapseMultipleCodeLinesThe field for thecollapseMultipleCodeLinesrecord component. -
ignoreEmptyLines
private final boolean ignoreEmptyLinesThe field for theignoreEmptyLinesrecord component. -
UNICODE_PROP_SYMBOLS
-
format
Format used for the test export.
-
-
Constructor Details
-
TextDiffToTikz
public TextDiffToTikz(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates an instance of aTextDiffToTikzrecord class.- Parameters:
collapseMultipleCodeLines- the value for thecollapseMultipleCodeLinesrecord componentignoreEmptyLines- the value for theignoreEmptyLinesrecord component
-
-
Method Details
-
main
- Throws:
IOExceptionDiffParseException
-
textDiff2Tikz
public void textDiff2Tikz(Path fileToConvert, GraphvizExporter.LayoutAlgorithm layout) throws IOException, DiffParseException - Throws:
IOExceptionDiffParseException
-
exportAsTikz
public static String exportAsTikz(VariationDiff<DiffLinesLabel> variationDiff, GraphvizExporter.LayoutAlgorithm layout) throws IOException - Throws:
IOException
-
tikzNodeLabel
-
substringBefore
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
collapseMultipleCodeLines
public boolean collapseMultipleCodeLines()Returns the value of thecollapseMultipleCodeLinesrecord component.- Returns:
- the value of the
collapseMultipleCodeLinesrecord component
-
ignoreEmptyLines
public boolean ignoreEmptyLines()Returns the value of theignoreEmptyLinesrecord component.- Returns:
- the value of the
ignoreEmptyLinesrecord component
-