Record Class TextDiffToTikz

java.lang.Object
java.lang.Record
org.variantsync.diffdetective.internal.TextDiffToTikz

public record TextDiffToTikz(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) extends Record
  • Field Details

    • collapseMultipleCodeLines

      private final boolean collapseMultipleCodeLines
      The field for the collapseMultipleCodeLines record component.
    • ignoreEmptyLines

      private final boolean ignoreEmptyLines
      The field for the ignoreEmptyLines record component.
    • UNICODE_PROP_SYMBOLS

      public static String[] UNICODE_PROP_SYMBOLS
    • format

      private static final Format<DiffLinesLabel> format
      Format used for the test export.
  • Constructor Details

    • TextDiffToTikz

      public TextDiffToTikz(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines)
      Creates an instance of a TextDiffToTikz record class.
      Parameters:
      collapseMultipleCodeLines - the value for the collapseMultipleCodeLines record component
      ignoreEmptyLines - the value for the ignoreEmptyLines record component
  • Method Details

    • main

      public static void main(String[] args) throws IOException, DiffParseException
      Throws:
      IOException
      DiffParseException
    • textDiff2Tikz

      public void textDiff2Tikz(Path fileToConvert, GraphvizExporter.LayoutAlgorithm layout) throws IOException, DiffParseException
      Throws:
      IOException
      DiffParseException
    • exportAsTikz

      public static String exportAsTikz(VariationDiff<DiffLinesLabel> variationDiff, GraphvizExporter.LayoutAlgorithm layout) throws IOException
      Throws:
      IOException
    • tikzNodeLabel

      public static String tikzNodeLabel(DiffNode<? extends DiffLinesLabel> node)
    • substringBefore

      public static String substringBefore(String str, Pattern end)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • collapseMultipleCodeLines

      public boolean collapseMultipleCodeLines()
      Returns the value of the collapseMultipleCodeLines record component.
      Returns:
      the value of the collapseMultipleCodeLines record component
    • ignoreEmptyLines

      public boolean ignoreEmptyLines()
      Returns the value of the ignoreEmptyLines record component.
      Returns:
      the value of the ignoreEmptyLines record component