private class Presorter.SortedResults.RowComparator extends java.lang.Object implements java.util.Comparator<Presorter.SortedResults.Row>
Modifier | Constructor and Description |
---|---|
private |
RowComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Presorter.SortedResults.Row r1,
Presorter.SortedResults.Row r2)
Compare two objects, where each is expected to be an instance of
PresortQuery.SortedResults.Row . |
public int compare(Presorter.SortedResults.Row r1, Presorter.SortedResults.Row r2)
PresortQuery.SortedResults.Row
.
For each comparison, the sort key array is extracted from each row. Each pair of elements in the arrays is compared using the corresponding sort criterion comparator, until an unequivalent result is obtained, or until no further elements remain (and the rows consequently are determined to sort at the same precedence).
compare
in interface java.util.Comparator<Presorter.SortedResults.Row>
r1
- First row to be compared.r2
- Second row to be compared.r1
is less than r2
;
positive number if r1
is greater than r2
;
0
if they compare as equivalent.