MapEntry.ComparingByValue Method

Definition

Overloads

ComparingByValue()
Obsolete.

Returns a comparator that compares Map.Entry in natural order on value.

ComparingByValue(IComparator)
Obsolete.

Returns a comparator that compares Map.Entry by value using the given Comparator.

ComparingByValue()

Caution

Use 'Java.Util.IMapEntry.ComparingByValue'. This class will be removed in a future release.

Returns a comparator that compares Map.Entry in natural order on value.

[Android.Runtime.Register("comparingByValue", "()Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V extends java.lang.Comparable<? super V>" })]
[System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByValue'. This class will be removed in a future release.")]
public static Java.Util.IComparator ComparingByValue ();
[<Android.Runtime.Register("comparingByValue", "()Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V extends java.lang.Comparable<? super V>" })>]
[<System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByValue'. This class will be removed in a future release.")>]
static member ComparingByValue : unit -> Java.Util.IComparator

Returns

a comparator that compares Map.Entry in natural order on value.

Attributes

Remarks

Returns a comparator that compares Map.Entry in natural order on value.

The returned comparator is serializable and throws NullPointerException when comparing an entry with null values.

Added in 1.8.

Java documentation for java.util.Map.Entry.comparingByValue().

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

ComparingByValue(IComparator)

Caution

Use 'Java.Util.IMapEntry.ComparingByValue'. This class will be removed in a future release.

Returns a comparator that compares Map.Entry by value using the given Comparator.

[Android.Runtime.Register("comparingByValue", "(Ljava/util/Comparator;)Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
[System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByValue'. This class will be removed in a future release.")]
public static Java.Util.IComparator ComparingByValue (Java.Util.IComparator cmp);
[<Android.Runtime.Register("comparingByValue", "(Ljava/util/Comparator;)Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
[<System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByValue'. This class will be removed in a future release.")>]
static member ComparingByValue : Java.Util.IComparator -> Java.Util.IComparator

Parameters

cmp
IComparator

the value Comparator

Returns

a comparator that compares Map.Entry by the value.

Attributes

Remarks

Returns a comparator that compares Map.Entry by value using the given Comparator.

The returned comparator is serializable if the specified comparator is also serializable.

Added in 1.8.

Java documentation for java.util.Map.Entry.comparingByValue(java.util.Comparator<? super V>).

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