A First-In-First-Out (FIFO) queue data structure.
T - The type of elements stored in the queue
Private
Removes and returns the element from the front of the queue.
Error if the queue is empty
Adds an element to the back of the queue.
The value to add
Checks if the queue is empty.
True if the queue contains no elements, false otherwise
Returns the element at the front of the queue without removing it.
The element at the front of the queue
Returns the number of elements in the queue.
The size of the queue
A First-In-First-Out (FIFO) queue data structure.
Typeparam
T - The type of elements stored in the queue