addFirst method
- E element
override
Adds value
at the beginning of the queue.
Implementation
@override
void addFirst(E element) {
_head = (_head - 1) & (_table.length - 1);
_table[_head] = element;
if (_head == _tail) _grow();
}
Adds value
at the beginning of the queue.
@override
void addFirst(E element) {
_head = (_head - 1) & (_table.length - 1);
_table[_head] = element;
if (_head == _tail) _grow();
}