IComparator.ComparingDouble(IToDoubleFunction) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Accepts a function that extracts a double
sort key from a type
T
, and returns a Comparator<T>
that compares by that
sort key.
[Android.Runtime.Register("comparingDouble", "(Ljava/util/function/ToDoubleFunction;)Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.IComparator? ComparingDouble (Java.Util.Functions.IToDoubleFunction? keyExtractor);
[<Android.Runtime.Register("comparingDouble", "(Ljava/util/function/ToDoubleFunction;)Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member ComparingDouble : Java.Util.Functions.IToDoubleFunction -> Java.Util.IComparator
Parameters
- keyExtractor
- IToDoubleFunction
the function used to extract the double sort key
Returns
a comparator that compares by an extracted key
- Attributes
Remarks
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.
Added in 1.8.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.