Comparator.NullsLast(IComparator) 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.
Caution
Use 'Java.Util.IComparator.NullsLast'. This class will be removed in a future release.
Returns a null-friendly comparator that considers null
to be
greater than non-null.
[Android.Runtime.Register("nullsLast", "(Ljava/util/Comparator;)Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
[System.Obsolete("Use 'Java.Util.IComparator.NullsLast'. This class will be removed in a future release.")]
public static Java.Util.IComparator? NullsLast (Java.Util.IComparator? comparator);
[<Android.Runtime.Register("nullsLast", "(Ljava/util/Comparator;)Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
[<System.Obsolete("Use 'Java.Util.IComparator.NullsLast'. This class will be removed in a future release.")>]
static member NullsLast : Java.Util.IComparator -> Java.Util.IComparator
Parameters
- comparator
- IComparator
a Comparator
for comparing non-null values
Returns
a comparator that considers null
to be greater than
non-null, and compares non-null objects with the supplied
Comparator
.
- Attributes
Remarks
Returns a null-friendly comparator that considers null
to be greater than non-null. When both are null
, they are considered equal. If both are non-null, the specified Comparator
is used to determine the order. If the specified comparator is null
, then the returned comparator considers all non-null values to be equal.
The returned comparator is serializable if the specified comparator is serializable.
Added in 1.8.
Java documentation for java.util.Comparator.nullsLast(java.util.Comparator<? super T>)
.
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.