IComparator.Compare(Object, Object) Method

Definition

Compares its two arguments for order.

[Android.Runtime.Register("compare", "(Ljava/lang/Object;Ljava/lang/Object;)I", "GetCompare_Ljava_lang_Object_Ljava_lang_Object_Handler:Java.Util.IComparatorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Compare (Java.Lang.Object? o1, Java.Lang.Object? o2);
[<Android.Runtime.Register("compare", "(Ljava/lang/Object;Ljava/lang/Object;)I", "GetCompare_Ljava_lang_Object_Ljava_lang_Object_Handler:Java.Util.IComparatorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Compare : Java.Lang.Object * Java.Lang.Object -> int

Parameters

o1
Object

the first object to be compared.

o2
Object

the second object to be compared.

Returns

Int32

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Attributes

Remarks

Java documentation for java.util.Comparator.compare(T, 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.

Applies to