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.

Parameters:
<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

Exceptions:
NullPointerException    if the argument is null

See also:
comparing(Function)

Since:  1.8