Class MeyersDiff<T>

java.lang.Object
com.github.difflib.algorithm.myers.MeyersDiff<T>
All Implemented Interfaces:
DiffAlgorithmI<T>

public final class MeyersDiff<T> extends Object implements DiffAlgorithmI<T>
A clean-room implementation of Eugene Meyers greedy differencing algorithm.
  • Constructor Details

    • MeyersDiff

      public MeyersDiff()
    • MeyersDiff

      public MeyersDiff(BiPredicate<T,T> equalizer)
  • Method Details

    • computeDiff

      public List<Change> computeDiff(List<T> source, List<T> target, DiffAlgorithmListener progress)
      Computes the changeset to patch the source list to the target list. Return empty diff if get the error while procession the difference.
      Specified by:
      computeDiff in interface DiffAlgorithmI<T>
      Parameters:
      source - source data
      target - target data
      progress - progress listener
      Returns:
    • factory

      public static DiffAlgorithmFactory factory()
      Factory to create instances of this specific diff algorithm.