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
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