Class AncestorComparator
java.lang.Object
org.outerj.daisy.diff.html.ancestor.AncestorComparator
- All Implemented Interfaces:
IRangeComparator
A comparator used when calculating the difference in ancestry of two Nodes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAncestor(int i) intReturns the number of comparable entities.getResult(AncestorComparator other, Locale locale) booleanrangesEqual(int owni, IRangeComparator otherComp, int otheri) Returns whether the comparable entity given by the first index matches an entity specified by the otherIRangeComparatorand index.booleanskipRangeComparison(int arg0, int arg1, IRangeComparator arg2) Returns whether a comparison should be skipped because it would be too costly (or lengthy).
-
Constructor Details
-
AncestorComparator
-
-
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:
owni- the index of the comparable entity within thisIRangeComparatorotherComp- the IRangeComparator to compare this withotheri- 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:
arg0- a number on which to base the decision whether to returntrueorfalsearg1- another number on which to base the decision whether to returntrueorfalsearg2- the otherIRangeComparatorto compare with- Returns:
trueto avoid a too lengthy range comparison
-
getAncestor
-
getCompareTxt
-
getResult
-