Returns a lexicographic-order comparator with a function that
extracts a key to be compared with the given Comparator
.
<U> | the type of the sort key | |
keyExtractor | the function used to extract the sort key | |
keyComparator | the Comparator used to compare the sort key |
NullPointerException | if either argument is null. |
comparing(Function, Comparator), thenComparing(Comparator)
@implSpec This default implementation behaves as if
thenComparing(comparing(keyExtractor, cmp))
.
Diagram: Comparator