Spec-Zone.ru › Dart 2

dart:collection

Метод removeWhere

void removeWhere(
  1. bool test(
    1. K key,
    2. V value
    )
)
override

Удаляет все элементы этой карты, которые удовлетворяют заданному test.

final terrestrial = <int, String>{1: 'Mercury', 2: 'Venus', 3: 'Earth'};
terrestrial.removeWhere((key, value) => value.startsWith('E'));
print(terrestrial); // {1: Mercury, 2: Venus}

Реализация

void removeWhere(bool test(K key, V value)) {
  _map.removeWhere(test);
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-collection/MapView/removeWhere.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API