ConcurrentHashMap.ForEach Method

Definition

Overloads

ForEach(Int64, IBiFunction, IConsumer)

Performs the given action for each non-null transformation of each (key, value).

ForEach(Int64, IBiConsumer)

Performs the given action for each (key, value).

ForEach(IBiConsumer)

Performs the given action for each (key, value).

ForEach(Int64, IBiFunction, IConsumer)

Performs the given action for each non-null transformation of each (key, value).

[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

Parameters

parallelismThreshold
Int64

the (estimated) number of elements needed for this operation to be executed in parallel

transformer
IBiFunction

a function returning the transformation for an element, or null if there is no transformation (in which case the action is not applied)

action
IConsumer

the action

Attributes

Remarks

Performs the given action for each non-null transformation of each (key, value).

Added in 1.8.

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

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

ForEach(Int64, IBiConsumer)

Performs the given action for each (key, value).

[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

Parameters

parallelismThreshold
Int64

the (estimated) number of elements needed for this operation to be executed in parallel

action
IBiConsumer

the action

Attributes

Remarks

Performs the given action for each (key, value).

Added in 1.8.

Java documentation for java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiConsumer<? super K, ? super V>).

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

ForEach(IBiConsumer)

Performs the given action for each (key, value).

[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

Parameters

action
IBiConsumer

the action

Implements

Attributes

Remarks

Java documentation for java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiConsumer).

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