Class Diff

  • public class Diff
    extends Object
    A class to compare vectors of objects.
    • Field Detail

      • heuristic

        public boolean heuristic
        When set to true, the comparison uses a heuristic to speed it up. With this heuristic, for files with a constant small density of changes, the algorithm is linear in the file size.
      • no_discards

        public boolean no_discards
        When set to true, the algorithm returns a guaranteed minimal set of changes. This makes things slower, sometimes much slower.
    • Constructor Detail

      • Diff

        public Diff​(Object[] a,
                    Object[] b)
        Constructor to find differences between two arrays.
        a - left "document"
        b - right document
    • Method Detail

      • diff_2

        public Diff.Change diff_2​(boolean reverse)
        Compute the difference between the 2 arrays.
        reverse - Indicates reverse diff
        the change