Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.compare.rangedifferencer
Class RangeDifferencer

java.lang.Object
  extended by 
org.eclipse.compare.rangedifferencer.RangeDifferencer

public final class RangeDifferencer
extends Object

A RangeDifferencer finds the differences between two or three IRangeComparators.

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.

See Also:
IRangeComparator, RangeDifference

Method Summary
static  RangeDifference[] findDifferences ( AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
          Finds the differences between two IRangeComparators.
static  RangeDifference[] findDifferences ( AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
          Finds the differences among three IRangeComparators.
static  RangeDifference[] findDifferences ( IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
          Finds the differences between two IRangeComparators.
static  RangeDifference[] findDifferences ( IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
          Finds the differences among three IRangeComparators.
static  RangeDifference[] findDifferences ( IRangeComparator left, IRangeComparator right)
          Finds the differences between two IRangeComparators.
static  RangeDifference[] findDifferences ( IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
          Finds the differences among three IRangeComparators.
static  RangeDifference[] findRanges ( AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
          Finds the differences among two IRangeComparators.
static  RangeDifference[] findRanges ( AbstractRangeDifferenceFactory factory, IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
          Finds the differences among three IRangeComparators.
static  RangeDifference[] findRanges ( IProgressMonitor pm, IRangeComparator left, IRangeComparator right)
          Finds the differences among two IRangeComparators.
static  RangeDifference[] findRanges ( IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
          Finds the differences among three IRangeComparators.
static  RangeDifference[] findRanges ( IRangeComparator left, IRangeComparator right)
          Finds the differences among two IRangeComparators.
static  RangeDifference[] findRanges ( IRangeComparator ancestor, IRangeComparator left, IRangeComparator right)
          Finds the differences among three IRangeComparators.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findDifferences

public static 
RangeDifference[] findDifferences(
IRangeComparator left,
                                                
IRangeComparator right)
Finds the differences between two IRangeComparators. The differences are returned as an array of RangeDifferences. If no differences are detected an empty array is returned.

Parameters:
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences, or an empty array if no differences were found

findDifferences

public static 
RangeDifference[] findDifferences(
IProgressMonitor pm,
                                                
IRangeComparator left,
                                                
IRangeComparator right)
Finds the differences between two IRangeComparators. The differences are returned as an array of RangeDifferences. If no differences are detected an empty array is returned.

Parameters:
pm - if not null used to report progress
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences, or an empty array if no differences were found
Since:
2.0

findDifferences

public static 
RangeDifference[] findDifferences(
AbstractRangeDifferenceFactory factory,
                                                
IProgressMonitor pm,
                                                
IRangeComparator left,
                                                
IRangeComparator right)
Finds the differences between two IRangeComparators. The differences are returned as an array of RangeDifferences. If no differences are detected an empty array is returned.

Parameters:
factory -
pm - if not null used to report progress
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences, or an empty array if no differences were found
Since:
org.eclipse.compare.core 3.5

findDifferences

public static 
RangeDifference[] findDifferences(
IRangeComparator ancestor,
                                                
IRangeComparator left,
                                                
IRangeComparator right)
Finds the differences among three IRangeComparators. The differences are returned as a list of RangeDifferences. If no differences are detected an empty list is returned. If the ancestor range comparator is null, a two-way comparison is performed.

Parameters:
ancestor - the ancestor range comparator or null
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences, or an empty array if no differences were found

findDifferences

public static 
RangeDifference[] findDifferences(
IProgressMonitor pm,
                                                
IRangeComparator ancestor,
                                                
IRangeComparator left,
                                                
IRangeComparator right)
Finds the differences among three IRangeComparators. The differences are returned as a list of RangeDifferences. If no differences are detected an empty list is returned. If the ancestor range comparator is null, a two-way comparison is performed.

Parameters:
pm - if not null used to report progress
ancestor - the ancestor range comparator or null
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences, or an empty array if no differences were found
Since:
2.0

findDifferences

public static 
RangeDifference[] findDifferences(
AbstractRangeDifferenceFactory factory,
                                                
IProgressMonitor pm,
                                                
IRangeComparator ancestor,
                                                
IRangeComparator left,
                                                
IRangeComparator right)
Finds the differences among three IRangeComparators. The differences are returned as a list of RangeDifferences. If no differences are detected an empty list is returned. If the ancestor range comparator is null, a two-way comparison is performed.

Parameters:
factory -
pm - if not null used to report progress
ancestor - the ancestor range comparator or null
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences, or an empty array if no differences were found
Since:
org.eclipse.compare.core 3.5

findRanges

public static 
RangeDifference[] findRanges(
IRangeComparator left,
                                           
IRangeComparator right)
Finds the differences among two IRangeComparators. In contrast to findDifferences, the result contains RangeDifference elements for non-differing ranges too.

Parameters:
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences

findRanges

public static 
RangeDifference[] findRanges(
IProgressMonitor pm,
                                           
IRangeComparator left,
                                           
IRangeComparator right)
Finds the differences among two IRangeComparators. In contrast to findDifferences, the result contains RangeDifference elements for non-differing ranges too.

Parameters:
pm - if not null used to report progress
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences
Since:
2.0

findRanges

public static 
RangeDifference[] findRanges(
AbstractRangeDifferenceFactory factory,
                                           
IProgressMonitor pm,
                                           
IRangeComparator left,
                                           
IRangeComparator right)
Finds the differences among two IRangeComparators. In contrast to findDifferences, the result contains RangeDifference elements for non-differing ranges too.

Parameters:
factory -
pm - if not null used to report progress
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences
Since:
org.eclipse.compare.core 3.5

findRanges

public static 
RangeDifference[] findRanges(
IRangeComparator ancestor,
                                           
IRangeComparator left,
                                           
IRangeComparator right)
Finds the differences among three IRangeComparators. 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.

Parameters:
ancestor - the ancestor range comparator or null
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences

findRanges

public static 
RangeDifference[] findRanges(
IProgressMonitor pm,
                                           
IRangeComparator ancestor,
                                           
IRangeComparator left,
                                           
IRangeComparator right)
Finds the differences among three IRangeComparators. 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.

Parameters:
pm - if not null used to report progress
ancestor - the ancestor range comparator or null
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences
Since:
2.0

findRanges

public static 
RangeDifference[] findRanges(
AbstractRangeDifferenceFactory factory,
                                           
IProgressMonitor pm,
                                           
IRangeComparator ancestor,
                                           
IRangeComparator left,
                                           
IRangeComparator right)
Finds the differences among three IRangeComparators. 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.

Parameters:
factory -
pm - if not null used to report progress
ancestor - the ancestor range comparator or null
left - the left range comparator
right - the right range comparator
Returns:
an array of range differences
Since:
org.eclipse.compare.core 3.5

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire