first property

(int, double) first

Returns the smallest element in the queue, and its priority.

The content of the queue is not changed.

The queue must not be empty.

Implementation

(int, double) get first {
  if (isEmpty) {
    throw StateError('Cannot peek at an empty priority queue');
  }
  return (_ids.first, _priorities.first);
}