語言

ConcurrentHashMap.ForEach 方法

定義

多載

名稱 Description
ForEach(Int64, IBiFunction, IConsumer)

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

ForEach(Int64, IBiConsumer)

對每個(鍵、值)執行給定動作。

ForEach(IBiConsumer)

對每個(鍵、值)執行給定動作。

ForEach(Int64, IBiFunction, IConsumer)

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

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

參數

parallelismThreshold
Int64

此操作需(估計)並行執行所需的元素數量

transformer
IBiFunction

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

action
IConsumer

戰鬥經過

屬性

備註

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

新增於1.8版本。

Java 文件 java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiFunction<? super K, ? super V, ? extends U>, java.util.function.Consumer<? super U>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

ForEach(Int64, IBiConsumer)

對每個(鍵、值)執行給定動作。

[Android.Runtime.Register("forEach", "(JLjava/util/function/BiConsumer;)V", "GetForEach_JLjava_util_function_BiConsumer_Handler", ApiSince=24)]
public virtual void ForEach(long parallelismThreshold, Java.Util.Functions.IBiConsumer action);
[<Android.Runtime.Register("forEach", "(JLjava/util/function/BiConsumer;)V", "GetForEach_JLjava_util_function_BiConsumer_Handler", ApiSince=24)>]
abstract member ForEach : int64 * Java.Util.Functions.IBiConsumer -> unit
override this.ForEach : int64 * Java.Util.Functions.IBiConsumer -> unit

參數

parallelismThreshold
Int64

此操作需(估計)並行執行所需的元素數量

action
IBiConsumer

戰鬥經過

屬性

備註

對每個(鍵、值)執行給定動作。

新增於1.8版本。

Java 文件 java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiConsumer<? super K, ? super V>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

ForEach(IBiConsumer)

對每個(鍵、值)執行給定動作。

[Android.Runtime.Register("forEach", "(Ljava/util/function/BiConsumer;)V", "GetForEach_Ljava_util_function_BiConsumer_Handler", ApiSince=24)]
public virtual void ForEach(Java.Util.Functions.IBiConsumer action);
[<Android.Runtime.Register("forEach", "(Ljava/util/function/BiConsumer;)V", "GetForEach_Ljava_util_function_BiConsumer_Handler", ApiSince=24)>]
abstract member ForEach : Java.Util.Functions.IBiConsumer -> unit
override this.ForEach : Java.Util.Functions.IBiConsumer -> unit

參數

action
IBiConsumer

戰鬥經過

實作

屬性

備註

Java 文件 java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiConsumer)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於