removeLast method

E removeLast ()
override

Removes and returns the last element of the queue.

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

Implementation

E removeLast() {
  _DoubleLinkedQueueEntry<E> lastEntry =
      _sentinel._previousLink as _DoubleLinkedQueueEntry<E>;
  E result = lastEntry._remove();
  _elementCount--;
  return result;
}