Spec-Zone.ru › Dart 2

dart:collection

Метод clear

void clear()
override

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

Реализация

void clear() {
  if (_head != _tail) {
    for (int i = _head; i != _tail; i = (i + 1) & (_table.length - 1)) {
      _table[i] = null;
    }
    _head = _tail = 0;
    _modificationCount++;
  }
}

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

Spec-Zone.ru

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