Class DiffDriver


  • public final class DiffDriver
    extends java.lang.Object
    Drives a diff engine to produce rendered textual diff output. Uses GNU Diff for Java: http://bmsi.com/java/#diff
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DiffDriver.Render
      Represents the output of a string-string diff comparison.
      static class  DiffDriver.TextRun
      Indicates formatting of a text run for diff display purposes.
      static class  DiffDriver.Type  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DiffDriver.Render render​(java.lang.String original, java.lang.String revised, boolean optimize)
      Given two strings, perform a diff comparison and return a Render object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DIFF_MERGEABLE_DELIMITER_PATTERN

        public static final java.util.regex.Pattern DIFF_MERGEABLE_DELIMITER_PATTERN
    • Method Detail

      • render

        public static DiffDriver.Render render​(java.lang.String original,
                                               java.lang.String revised,
                                               boolean optimize)
        Given two strings, perform a diff comparison and return a Render object.
        Parameters:
        original - Original string
        revised - Revised string for comparison
        Returns:
        Render object