Queue<T> class

Complexity of each operation

operation | complexity size | O(1) isEmpty | O(1) peek | O(1) enqueue | O(1) dequeue | O(1) Implementation of Queue using a SinglyLinkedList

Constructors

Queue()

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns true if the queue is empty.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Returns the size of the queue.
no setter

Methods

dequeue() → T?
Removes front element from the queue. This method returns the dequeued element or returns null if the queue is empty.
enqueue(T obj) → void
Adds an element to the queue.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() → T?
Returns front element in the queue. This method returns null if the queue is empty.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited