MapEntry.ComparingByKey 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.
Overloads
ComparingByKey() |
Obsolete.
Returns a comparator that compares |
ComparingByKey(IComparator) |
Obsolete.
Returns a comparator that compares |
ComparingByKey()
Caution
Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.
Returns a comparator that compares Map.Entry
in natural order on key.
[Android.Runtime.Register("comparingByKey", "()Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K extends java.lang.Comparable<? super K>", "V" })]
[System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.")]
public static Java.Util.IComparator ComparingByKey ();
[<Android.Runtime.Register("comparingByKey", "()Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K extends java.lang.Comparable<? super K>", "V" })>]
[<System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.")>]
static member ComparingByKey : unit -> Java.Util.IComparator
Returns
a comparator that compares Map.Entry
in natural order on key.
- Attributes
Remarks
Returns a comparator that compares Map.Entry
in natural order on key.
The returned comparator is serializable and throws NullPointerException
when comparing an entry with a null key.
Added in 1.8.
Java documentation for java.util.Map.Entry.comparingByKey()
.
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
ComparingByKey(IComparator)
Caution
Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.
Returns a comparator that compares Map.Entry
by key using the given
Comparator
.
[Android.Runtime.Register("comparingByKey", "(Ljava/util/Comparator;)Ljava/util/Comparator;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
[System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.")]
public static Java.Util.IComparator ComparingByKey (Java.Util.IComparator cmp);
[<Android.Runtime.Register("comparingByKey", "(Ljava/util/Comparator;)Ljava/util/Comparator;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
[<System.Obsolete("Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.")>]
static member ComparingByKey : Java.Util.IComparator -> Java.Util.IComparator
Parameters
- cmp
- IComparator
the key Comparator
Returns
a comparator that compares Map.Entry
by the key.
- Attributes
Remarks
Returns a comparator that compares Map.Entry
by key 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.comparingByKey(java.util.Comparator<? super K>)
.
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.