Map.opApply

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.

@implSpec The final implementation is equivalent to, for this {@code map}: <pre> {@code for (MapEntry<K, V> entry : map.entrySet()) action.accept(entry.getKey(), entry.getValue()); }</pre>

The final implementation makes no guarantees about synchronization or atomicity properties of this method. Any implementation providing atomicity guarantees must override this method and document its concurrency properties.

@param action The action to be performed for each entry @throws NullPointerException if the specified action is null @throws ConcurrentModificationException if an entry is found to be removed during iteration

  1. int opApply(int delegate(ref K, ref V) dg)
    interface Map(K, V)
    int
    opApply
    (
    scope int delegate
    (
    ref K
    ,
    ref V
    )
    dg
    )
  2. int opApply(int delegate(MapEntry!(K, V) entry) dg)

Meta