The first value to be compared.
The second value to be compared.
Optional rowA: anyOptional. The row object containing valueA.
Optional rowB: anyOptional. The row object containing valueB.
Optional f: numberOptional. The direction. It is not necessary to use this value in the comparator, as this number is used as a factor (1 or -1) in the outer sort method.
A number indicating the relative order of 'valueA' and 'valueB'.
Represents a function that compares two values for sorting purposes. The function takes two values of type T and optionally their corresponding row objects of type U, compares them, and returns a number. If the result is negative, it means 'valueA' comes before 'valueB' in the sorted order. If the result is positive, it means 'valueB' comes before 'valueA' in the sorted order. If the result is zero, it means the two values are considered equal for sorting purposes.