語言

ConcurrentHashMap.ForEachKey 方法

定義

多載

名稱 Description
ForEachKey(Int64, IConsumer)

對每個鍵執行指定動作。

ForEachKey(Int64, IFunction, IConsumer)

對每個鍵的非空轉換執行給定動作。

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)

對每個鍵的非空轉換執行給定動作。

[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

一個回傳元素轉換的函數,或若沒有轉換(此時不應用該動作),則為空函數

action
IConsumer

戰鬥經過

屬性

備註

對每個鍵的非空轉換執行給定動作。

新增於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 屬性授權中所述的詞彙使用。

適用於