public class MeyersDiffWithLinearSpace<T> extends java.lang.Object implements DiffAlgorithmI<T>
Modifier and Type | Class and Description |
---|---|
private class |
MeyersDiffWithLinearSpace.DiffData |
private class |
MeyersDiffWithLinearSpace.Snake |
Modifier and Type | Field and Description |
---|---|
private java.util.function.BiPredicate<T,T> |
equalizer |
Constructor and Description |
---|
MeyersDiffWithLinearSpace() |
MeyersDiffWithLinearSpace(java.util.function.BiPredicate<T,T> equalizer) |
Modifier and Type | Method and Description |
---|---|
private void |
buildScript(MeyersDiffWithLinearSpace.DiffData data,
int start1,
int end1,
int start2,
int end2,
java.util.function.Consumer<java.lang.Integer> progress) |
private MeyersDiffWithLinearSpace.Snake |
buildSnake(MeyersDiffWithLinearSpace.DiffData data,
int start,
int diag,
int end1,
int end2) |
java.util.List<Change> |
computeDiff(java.util.List<T> source,
java.util.List<T> target,
DiffAlgorithmListener progress)
Computes the changeset to patch the source list to the target list.
|
static DiffAlgorithmFactory |
factory()
Factory to create instances of this specific diff algorithm.
|
private MeyersDiffWithLinearSpace.Snake |
getMiddleSnake(MeyersDiffWithLinearSpace.DiffData data,
int start1,
int end1,
int start2,
int end2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeDiff
public java.util.List<Change> computeDiff(java.util.List<T> source, java.util.List<T> target, DiffAlgorithmListener progress)
DiffAlgorithmI
computeDiff
in interface DiffAlgorithmI<T>
source
- source datatarget
- target dataprogress
- progress listenerprivate void buildScript(MeyersDiffWithLinearSpace.DiffData data, int start1, int end1, int start2, int end2, java.util.function.Consumer<java.lang.Integer> progress)
private MeyersDiffWithLinearSpace.Snake getMiddleSnake(MeyersDiffWithLinearSpace.DiffData data, int start1, int end1, int start2, int end2)
private MeyersDiffWithLinearSpace.Snake buildSnake(MeyersDiffWithLinearSpace.DiffData data, int start, int diag, int end1, int end2)
public static DiffAlgorithmFactory factory()