difflib
Interface DiffAlgorithm<T>

All Known Implementing Classes:
MyersDiff

public interface DiffAlgorithm<T>

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

Author:
Dmitry Naumenko

Method Summary
 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.
 Patch<T> diff(T[] original, T[] revised)
          Computes the difference between the original sequence and the revised sequence and returns it as a Patch object.
 

Method Detail

diff

Patch<T> diff(T[] original,
              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.

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.


Copyright © 2009-2013. All Rights Reserved.