filter method

Map<K, V> filter(
  1. bool pred(
    1. KeyValuePair<K, V>
    )
)

Call the given predicate on each key-value pair in the collection and for each pair that it returns true, add the key-value association in a new Map.

Unlike Iterator#filter, this returns a Map, not an Iterator. @expose @param {function(KeyValuePair.<K,V>):boolean} pred This function must not have any side-effects. @return {Map.<K,V>}

Implementation

_i3.Map<K, V> filter(_i2.bool Function(_i3.KeyValuePair<K, V>) pred) =>
    _i4.callMethod(
      this,
      'filter',
      [_i4.allowInterop(pred)],
    );