Accepts a function that extracts a double
sort key from a type
T
, and returns a Comparator<T>
that compares by that
sort key.
The returned comparator is serializable if the specified function is also serializable.
<T> | the type of element to be compared | |
keyExtractor | the function used to extract the double sort key |
NullPointerException | if the argument is null |
comparing(Function)
Diagram: Comparator