@@ -412,25 +412,29 @@ class DoubleLinkedQueue<E> extends Iterable<E> implements Queue<E> {
412412 /// The entry object of the first element in the queue.
413413 ///
414414 /// Each element of the queue has an associated [DoubleLinkedQueueEntry] .
415- /// Returns the entry object corresponding to the first element of the queue.
415+ ///
416+ /// Returns the entry object corresponding to the first element of the queue,
417+ /// or `null` if the queue is empty.
416418 ///
417419 /// The entry objects can also be accessed using [lastEntry] ,
418- /// and they can be iterated using [DoubleLinkedQueueEntry.nextEntry() ] and
419- /// [DoubleLinkedQueueEntry.previousEntry() ] .
420- DoubleLinkedQueueEntry <E > firstEntry () {
421- return _sentinel.nextEntry ()! ;
420+ /// and they can be iterated using [DoubleLinkedQueueEntry.nextEntry] and
421+ /// [DoubleLinkedQueueEntry.previousEntry] .
422+ DoubleLinkedQueueEntry <E >? firstEntry () {
423+ return _sentinel.nextEntry ();
422424 }
423425
424426 /// The entry object of the last element in the queue.
425427 ///
426428 /// Each element of the queue has an associated [DoubleLinkedQueueEntry] .
427- /// Returns the entry object corresponding to the last element of the queue.
429+ ///
430+ /// Returns the entry object corresponding to the last element of the queue,
431+ /// or `null` if the queue is empty.
428432 ///
429433 /// The entry objects can also be accessed using [firstEntry] ,
430- /// and they can be iterated using [DoubleLinkedQueueEntry.nextEntry() ] and
431- /// [DoubleLinkedQueueEntry.previousEntry() ] .
432- DoubleLinkedQueueEntry <E > lastEntry () {
433- return _sentinel.previousEntry ()! ;
434+ /// and they can be iterated using [DoubleLinkedQueueEntry.nextEntry] and
435+ /// [DoubleLinkedQueueEntry.previousEntry] .
436+ DoubleLinkedQueueEntry <E >? lastEntry () {
437+ return _sentinel.previousEntry ();
434438 }
435439
436440 bool get isEmpty {
0 commit comments