共用方式為


ConcurrentHashMap.ForEachKey 方法

定義

多載

ForEachKey(Int64, IConsumer)

針對每個索引鍵執行指定的動作。

ForEachKey(Int64, IFunction, IConsumer)

針對每個索引鍵的每個非 Null 轉換執行指定的動作。

ForEachKey(Int64, IConsumer)

針對每個索引鍵執行指定的動作。

[Android.Runtime.Register("forEachKey", "(JLjava/util/function/Consumer;)V", "GetForEachKey_JLjava_util_function_Consumer_Handler", ApiSince=24)]
public virtual void ForEachKey (long parallelismThreshold, Java.Util.Functions.IConsumer action);
[<Android.Runtime.Register("forEachKey", "(JLjava/util/function/Consumer;)V", "GetForEachKey_JLjava_util_function_Consumer_Handler", ApiSince=24)>]
abstract member ForEachKey : int64 * Java.Util.Functions.IConsumer -> unit
override this.ForEachKey : int64 * Java.Util.Functions.IConsumer -> unit

參數

parallelismThreshold
Int64

要平行執行此作業所需的項目數(估計) 數目

action
IConsumer

動作

屬性

備註

針對每個索引鍵執行指定的動作。

已在1.8中新增。

java.util.concurrent.ConcurrentHashMap.forEachKey(long, java.util.function.Consumer<? super K>)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

ForEachKey(Int64, IFunction, IConsumer)

針對每個索引鍵的每個非 Null 轉換執行指定的動作。

[Android.Runtime.Register("forEachKey", "(JLjava/util/function/Function;Ljava/util/function/Consumer;)V", "GetForEachKey_JLjava_util_function_Function_Ljava_util_function_Consumer_Handler", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "U" })]
public virtual void ForEachKey (long parallelismThreshold, Java.Util.Functions.IFunction transformer, Java.Util.Functions.IConsumer action);
[<Android.Runtime.Register("forEachKey", "(JLjava/util/function/Function;Ljava/util/function/Consumer;)V", "GetForEachKey_JLjava_util_function_Function_Ljava_util_function_Consumer_Handler", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "U" })>]
abstract member ForEachKey : int64 * Java.Util.Functions.IFunction * Java.Util.Functions.IConsumer -> unit
override this.ForEachKey : int64 * Java.Util.Functions.IFunction * Java.Util.Functions.IConsumer -> unit

參數

parallelismThreshold
Int64

要平行執行此作業所需的項目數(估計) 數目

transformer
IFunction

傳回元素轉換的函式,如果沒有轉換,則為 null(在此情況下不會套用動作)

action
IConsumer

動作

屬性

備註

針對每個索引鍵的每個非 Null 轉換執行指定的動作。

已在1.8中新增。

java.util.concurrent.ConcurrentHashMap.forEachKey(long, java.util.function.Function<? super K, ? extends U>, java.util.function.Consumer<? super U>)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於