Spec-Zone.ru › Dart 1

dart:collection

Метод remove

bool remove(Object o)

Удалить единственный экземпляр value из очереди.

Возвращает true если значение было удалено, или false если очередь не содержала элемент, равный value.

Исходный код

bool remove(Object o) {
  _DoubleLinkedQueueEntry<E> entry = _sentinel._nextLink;
  while (!identical(entry, _sentinel)) {
    bool equals = (entry._element == o);
    if (!identical(this, entry._queue)) {
      // Entry must still be in the queue.
      throw new ConcurrentModificationError(this);
    }
    if (equals) {
      entry._remove();
      _elementCount--;
      return true;
    }
    entry = entry._nextLink;
  }
  return false;
}

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

Spec-Zone.ru

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