MapEntry.ComparingByKey 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| ComparingByKey() |
已淘汰.
傳回比較子,這個比較子會依索引鍵的自然順序進行比較 |
| ComparingByKey(IComparator) |
已淘汰.
傳回使用指定 |
ComparingByKey()
警告
Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.
傳回比較子,這個比較子會依索引鍵的自然順序進行比較 Map.Entry 。
[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
傳回
索引鍵上以自然順序比較 Map.Entry 的比較子。
- 屬性
備註
傳回比較子,這個比較子會依索引鍵的自然順序進行比較 Map.Entry 。
傳回的比較子可串行化,並在比較專案與 Null 索引鍵時擲回 NullPointerException 。
已在1.8中新增。
的 java.util.Map.Entry.comparingByKey()Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
ComparingByKey(IComparator)
警告
Use 'Java.Util.IMapEntry.ComparingByKey'. This class will be removed in a future release.
傳回使用指定 Comparator索引鍵比較Map.Entry的比較子。
[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
參數
- cmp
- IComparator
索引鍵 Comparator
傳回
索引鍵比較 Map.Entry 的比較子。
- 屬性
備註
傳回使用指定 Comparator索引鍵比較Map.Entry的比較子。
如果指定的比較子也是可串行化的,則傳回的比較子可串行化。
已在1.8中新增。
的 java.util.Map.Entry.comparingByKey(java.util.Comparator<? super K>)Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。