first property

E first
override

Returns the next element that will be returned by removeFirst.

The element is not removed from the queue.

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

Implementation

E get first {
  if (_length == 0) throw new StateError("No such element");
  return _queue[0];
}