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