public static <T> Comparator<T> comparingDouble (ToDoubleFunction<? super T> keyExtractor)

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

Returns:  a comparator that compares by an extracted key

NullPointerException    if the argument is null

See also:

Since:  1.8