Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2e4ffaf2ba93bf2123920c6b25280caa52dcf2d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="IBM">
   <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
   <title>Package-level Javadoc</title>
</head>
<body>
Provides support for finding the differences between
two or three sequences of comparable entities.
<h2>
Package Specification</h2>
The class <tt>Differencer</tt> finds longest sequences of matching and
non-matching comparable entities.
<p>Clients must supply the input to the differencer as an implementation
of the <tt>IRangeComparator</tt> interface.
<br>An <tt>IRangeComparator</tt> breaks the input data into a sequence
of entities and provides a method for comparing
<br>one entity with the entity in another <tt>IRangeComparator</tt>.
<br>For example, to compare two text documents and find longest common
sequences
<br>of matching and non-matching lines, the implementation of <tt>IRangeComparator
</tt>must break the document
<br>into lines and provide a method for testing whether two lines are considered
equal.
<p>The differencer returns the differences among these sequences as an
array of <tt>RangeDifference</tt> objects.
<br>Every single <tt>RangeDifference</tt> describes kind of difference
(no change, change, addition, deletion)
<br>and the corresponding ranges of the underlying comparable entities
in the two or three inputs.
<p>The algorithm used is an objectified version of one described in:
<br><i>A File Comparison Program,</i> by Webb Miller and Eugene W. Myers,
<br>Software Practice and Experience, Vol. 15, Nov. 1985.
</body>
</html>

Back to the top