removeFirst method Null safety

E removeFirst ()
override

Removes and returns the first element of this queue.

The queue must not be empty when this method is called.

Implementation

E removeFirst() {
  _DoubleLinkedQueueEntry<E> firstEntry =
      _sentinel._nextLink as _DoubleLinkedQueueEntry<E>;
  E result = firstEntry._remove();
  _elementCount--;
  return result;
}