Package org.eclipse.compare
Class EventSequenceComparator
java.lang.Object
org.eclipse.compare.EventSequenceComparator
- All Implemented Interfaces:
IRangeComparator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItem(int idx) intReturns the number of comparable entities.booleanrangesEqual(int idx, IRangeComparator rc2, int idx2) Returns whether the comparable entity given by the first index matches an entity specified by the otherIRangeComparatorand index.booleanskipRangeComparison(int length, int maxLength, IRangeComparator other) Returns whether a comparison should be skipped because it would be too costly (or lengthy).
-
Field Details
-
esList
List<EventSequence> esList
-
-
Constructor Details
-
EventSequenceComparator
-
-
Method Details
-
getRangeCount
public int getRangeCount()Description copied from interface:IRangeComparatorReturns the number of comparable entities.- Specified by:
getRangeCountin interfaceIRangeComparator- Returns:
- the number of comparable entities
-
rangesEqual
Description copied from interface:IRangeComparatorReturns whether the comparable entity given by the first index matches an entity specified by the otherIRangeComparatorand index.- Specified by:
rangesEqualin interfaceIRangeComparator- Parameters:
idx- the index of the comparable entity within thisIRangeComparatorrc2- the IRangeComparator to compare this withidx2- the index of the comparable entity within the otherIRangeComparator- Returns:
trueif the comparable entities are equal
-
skipRangeComparison
Description copied from interface:IRangeComparatorReturns whether a comparison should be skipped because it would be too costly (or lengthy).- Specified by:
skipRangeComparisonin interfaceIRangeComparator- Parameters:
length- a number on which to base the decision whether to returntrueorfalsemaxLength- another number on which to base the decision whether to returntrueorfalseother- the otherIRangeComparatorto compare with- Returns:
trueto avoid a too lengthy range comparison
-
getItem
-