diffpackage implements the differencing engine that JRCS uses.
A simple interface for implementations of differencing algorithms.
Definition of a Visitor interface for
Holds an add-delta between to revisions of a text.
Holds an change-delta between to revisions of a text.
Holds a information about a part of the text involved in a differencing or patching operation.
Holds a delete-delta between to revisions of a text.
Holds a "delta" difference between to revisions of a text.
Implements a differencing engine that works on arrays of
A Revision holds the series of deltas that describe the differences between two sequences.
This class delegates handling of the to a StringBuilder based version.
Thrown whenever the differencing engine cannot produce the differences between two revisions of ta text.
Base class for all exceptions emanating from this package.
Thrown whenever a delta cannot be applied as a patch to a given text.
diff package implements
the differencing engine that JRCS uses. The engine has the power
of Unix diff, is simple to understand, and can be used
independently of the archive handling functionality. The entry
point to the differencing engine is class
Text is represented as
Object because the diff
engine is capable of handling more than plain ascci. In fact,
arrays of any type that implements
equals() correctly can be subject to
differencing using this library.
Two implementations of the differencing algorithm are provided.
Simple Diffis a verys imple algorithm that is fast and works well with very large input sequences, but that frequently produces result that are subotimal (at times four or more times larger than GNU diff).
MyersDiffis an implementation of Gene Myers differencing algorithm. Myer's algorithm produces optimum results (minimum diffs), but consumes considerably more memory than SimpleDiff, so its not suitable for very large files.
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.