public final class RangeDifferencer extends Object
RangeDifferencer
finds the differences between two or three IRangeComparator
s.
To use the differencer, clients provide an IRangeComparator
that breaks their input data into a sequence of comparable entities. The differencer
returns the differences among these sequences as an array of RangeDifference
objects
(findDifferences
methods).
Every RangeDifference
represents a single kind of difference
and the corresponding ranges of the underlying comparable entities in the
left, right, and optionally ancestor sides.
Alternatively, the findRanges
methods not only return objects for
the differing ranges but for non-differing ranges too.
IRangeComparator
,
RangeDifference
Modifier and Type | Method and Description |
---|---|
static RangeDifference[] |
findDifferences(AbstractRangeDifferenceFactory factory,
IProgressMonitor pm,
IRangeComparator left,
IRangeComparator right)
Finds the differences between two
IRangeComparator s. |
static RangeDifference[] |
findDifferences(AbstractRangeDifferenceFactory factory,
IProgressMonitor pm,
IRangeComparator ancestor,
IRangeComparator left,
IRangeComparator right)
Finds the differences among three
IRangeComparator s. |
static RangeDifference[] |
findDifferences(IProgressMonitor pm,
IRangeComparator left,
IRangeComparator right)
Finds the differences between two
IRangeComparator s. |
static RangeDifference[] |
findDifferences(IProgressMonitor pm,
IRangeComparator ancestor,
IRangeComparator left,
IRangeComparator right)
Finds the differences among three
IRangeComparator s. |
static RangeDifference[] |
findDifferences(IRangeComparator left,
IRangeComparator right)
Finds the differences between two
IRangeComparator s. |
static RangeDifference[] |
findDifferences(IRangeComparator ancestor,
IRangeComparator left,
IRangeComparator right)
Finds the differences among three
IRangeComparator s. |
static RangeDifference[] |
findRanges(AbstractRangeDifferenceFactory factory,
IProgressMonitor pm,
IRangeComparator left,
IRangeComparator right)
Finds the differences among two
IRangeComparator s. |
static RangeDifference[] |
findRanges(AbstractRangeDifferenceFactory factory,
IProgressMonitor pm,
IRangeComparator ancestor,
IRangeComparator left,
IRangeComparator right)
Finds the differences among three
IRangeComparator s. |
static RangeDifference[] |
findRanges(IProgressMonitor pm,
IRangeComparator left,
IRangeComparator right)
Finds the differences among two
IRangeComparator s. |
static RangeDifference[] |
findRanges(IProgressMonitor pm,
IRangeComparator ancestor,
IRangeComparator left,
IRangeComparator right)
Finds the differences among three
IRangeComparator s. |
static RangeDifference[] |
findRanges(IRangeComparator left,
IRangeComparator right)
Finds the differences among two
IRangeComparator s. |
static RangeDifference[] |
findRanges(IRangeComparator ancestor,
IRangeComparator left,
IRangeComparator right)
Finds the differences among three
IRangeComparator s. |
public static RangeDifference[] findDifferences(IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
The differences are returned as an array of RangeDifference
s.
If no differences are detected an empty array is returned.left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findDifferences(IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
The differences are returned as an array of RangeDifference
s.
If no differences are detected an empty array is returned.pm
- if not null
used to report progressleft
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findDifferences(AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
The differences are returned as an array of RangeDifference
s.
If no differences are detected an empty array is returned.factory
- pm
- if not null
used to report progressleft
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findDifferences(IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
The differences are returned as a list of RangeDifference
s.
If no differences are detected an empty list is returned.
If the ancestor range comparator is null
, a two-way
comparison is performed.ancestor
- the ancestor range comparator or null
left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findDifferences(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
The differences are returned as a list of RangeDifference
s.
If no differences are detected an empty list is returned.
If the ancestor range comparator is null
, a two-way
comparison is performed.pm
- if not null
used to report progressancestor
- the ancestor range comparator or null
left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findDifferences(AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
The differences are returned as a list of RangeDifference
s.
If no differences are detected an empty list is returned.
If the ancestor range comparator is null
, a two-way
comparison is performed.factory
- pm
- if not null
used to report progressancestor
- the ancestor range comparator or null
left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findRanges(IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
In contrast to findDifferences
, the result
contains RangeDifference
elements for non-differing ranges too.left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
In contrast to findDifferences
, the result
contains RangeDifference
elements for non-differing ranges too.pm
- if not null
used to report progressleft
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findRanges(AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
In contrast to findDifferences
, the result
contains RangeDifference
elements for non-differing ranges too.factory
- pm
- if not null
used to report progressleft
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findRanges(IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
In contrast to findDifferences
, the result
contains RangeDifference
elements for non-differing ranges too.
If the ancestor range comparator is null
, a two-way
comparison is performed.ancestor
- the ancestor range comparator or null
left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
In contrast to findDifferences
, the result
contains RangeDifference
elements for non-differing ranges too.
If the ancestor range comparator is null
, a two-way
comparison is performed.pm
- if not null
used to report progressancestor
- the ancestor range comparator or null
left
- the left range comparatorright
- the right range comparatorpublic static RangeDifference[] findRanges(AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
IRangeComparator
s.
In contrast to findDifferences
, the result
contains RangeDifference
elements for non-differing ranges too.
If the ancestor range comparator is null
, a two-way
comparison is performed.factory
- pm
- if not null
used to report progressancestor
- the ancestor range comparator or null
left
- the left range comparatorright
- the right range comparator
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.