Spec-Zone.ru › Dart 2

dart:collection

Метод clear

void clear()
override

Удаляет все элементы из очереди. Размер очереди становится нулевым.

Реализация

void clear() {
  var cursor = _sentinel._nextLink!;
  while (true) {
    var entry = cursor._asNonSentinelEntry();
    if (entry == null) break;
    cursor = cursor._nextLink!;
    entry
      .._nextLink = null
      .._previousLink = null
      .._queue = null;
  }
  _sentinel._nextLink = _sentinel;
  _sentinel._previousLink = _sentinel;
  _elementCount = 0;
}

© 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/DoubleLinkedQueue/clear.html

Spec-Zone.ru

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