addFirst method

void addFirst (E element)
override

Adds value at the beginning of the queue.

Implementation

void addFirst(E element) {
  _head = (_head - 1) & (_table.length - 1);
  _table[_head] = element;
  if (_head == _tail) _grow();
}