Udostępnij za pośrednictwem


IComparator.ReverseOrder Method

Definition

Returns a comparator that imposes the reverse of the <em>natural ordering</em>.

[Android.Runtime.Register("reverseOrder", "()Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.Comparable<? super T>" })]
public static Java.Util.IComparator? ReverseOrder ();
[<Android.Runtime.Register("reverseOrder", "()Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.Comparable<? super T>" })>]
static member ReverseOrder : unit -> Java.Util.IComparator

Returns

a comparator that imposes the reverse of the natural ordering on Comparable objects.

Attributes

Remarks

Returns a comparator that imposes the reverse of the <em>natural ordering</em>.

The returned comparator is serializable and throws NullPointerException when comparing null.

Added in 1.8.

Java documentation for java.util.Comparator.reverseOrder().

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.

Applies to