Udostępnij za pośrednictwem


ConcurrentHashMap.ForEachKey Method

Definition

Overloads

ForEachKey(Int64, IConsumer)

Performs the given action for each key.

ForEachKey(Int64, IFunction, IConsumer)

Performs the given action for each non-null transformation of each key.

ForEachKey(Int64, IConsumer)

Performs the given action for each key.

[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

Parameters

parallelismThreshold
Int64

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

action
IConsumer

the action

Attributes

Remarks

Performs the given action for each key.

Added in 1.8.

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

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

ForEachKey(Int64, IFunction, IConsumer)

Performs the given action for each non-null transformation of each key.

[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

Parameters

parallelismThreshold
Int64

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

transformer
IFunction

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.

Added in 1.8.

Java documentation for java.util.concurrent.ConcurrentHashMap.forEachKey(long, java.util.function.Function<? super K, ? 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