Interface DiffAlgorithm<T>

  • Type Parameters:
    T - The type of the compared elements in the 'lines'.
    All Known Implementing Classes:
    MyersDiff

    public interface DiffAlgorithm<T>
    Copy from https://code.google.com/p/java-diff-utils/.

    The general interface for computing diffs between two lists of elements of type T.

    Author:
    Dmitry Naumenko
    • Method Detail

      • diff

        Patch<T> diff​(List<T> original,
                      List<T> revised)
        Computes the difference between the original sequence and the revised sequence and returns it as a Patch object.
        Parameters:
        original - The original sequence. Must not be null.
        revised - The revised sequence. Must not be null.
        Returns:
        The patch representing the diff of the given sequences. Never null.