Spec-Zone.ru › Dart 1

dart:html

Метод removeWhere

void removeWhere(bool test(E element))

Удаляет все объекты из этого списка, которые удовлетворяют test.

Объект o удовлетворяет test , если test(o) равно true.

List<String> numbers = ['one', 'two', 'three', 'four'];
numbers.removeWhere((item) => item.length == 3);
numbers.join(', '); // 'three, four'

Выбрасывает UnsupportedError , если это список с фиксированной длиной.

Исходный код

void removeWhere(bool test(E element)) {
  throw new UnsupportedError("Cannot remove from immutable List.");
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/ImmutableListMixin/removeWhere.html

Spec-Zone.ru

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