A clean-room implementation of Eugene Myers differencing algorithm.
See the paper at http://www.cs.arizona.edu/people/gene/PAPERS/diff.ps
| Modifier and Type | Field and Description |
|---|---|
| private final Equalizer | equalizer
The equalizer. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PathNode | |
| public Patch | |
| private List | Returns: A new list of the specified range within the original list.The original sequence. Must not be original, final int null.low endpoint (inclusive) of the subList. fromIndex, final int high endpoint (exclusive) of the subList. to)Creates a new list containing the elements returned by |
| public Patch | diff(final List<T>
The original sequence. Must not be original, final List<T> null.The revised sequence. Must not be revised)null.Implements org. Patch object.
|
| private boolean |
| equalizer | back to summary |
|---|---|
| private final Equalizer<T> equalizer The equalizer. | |
| MyersDiff | back to summary |
|---|---|
| public MyersDiff() Constructs an instance of the Myers differencing algorithm. | |
| buildPath | back to summary |
|---|---|
| public PathNode buildPath(final List<T> orig, final List<T> rev) Computes the minimum diffpath that expresses de differences between the original and revised sequences, according to Gene Myers differencing algorithm.
| |
| buildRevision | back to summary |
|---|---|
| public Patch Constructs a | |
| copyOfRange | back to summary |
|---|---|
| private List Creates a new list containing the elements returned by | |
| diff | back to summary |
|---|---|
| public Patch Implements org. Doc from org. Computes the difference between the original sequence and the revised
sequence and returns it as a | |
| equals | back to summary |
|---|---|
| private boolean equals(T orig, T rev) | |