共用方式為


IMap.ForEach(IBiConsumer) Method

Definition

Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.

[Android.Runtime.Register("forEach", "(Ljava/util/function/BiConsumer;)V", "GetForEach_Ljava_util_function_BiConsumer_Handler:Java.Util.IMap, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 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:Java.Util.IMap, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member ForEach : Java.Util.Functions.IBiConsumer -> unit
override this.ForEach : Java.Util.Functions.IBiConsumer -> unit

Parameters

action
IBiConsumer

The action to be performed for each entry

Attributes

Remarks

Performs the given action for each entry in this map until all entries have been processed or the action throws an exception. Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.) Exceptions thrown by the action are relayed to the caller.

Added in 1.8.

Java documentation for java.util.Map.forEach(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