Package dsa.impl
Class LinkedQueue<T>
java.lang.Object
dsa.impl.LinkedQueue<T>
- All Implemented Interfaces:
IQueue<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondequeue()
Remove and return the first element in the queue.void
Addelement
to the back of the queue.front()
Get (but don't remove) the element at the front of the queue.boolean
isEmpty()
Check if the queue is empty.int
size()
Get the number of elements in the queue.toString()
-
Constructor Details
-
LinkedQueue
public LinkedQueue()
-
-
Method Details
-
enqueue
Description copied from interface:IQueue
Addelement
to the back of the queue. -
dequeue
Description copied from interface:IQueue
Remove and return the first element in the queue. -
size
public int size()Description copied from interface:IQueue
Get the number of elements in the queue. -
isEmpty
public boolean isEmpty()Description copied from interface:IQueue
Check if the queue is empty. -
front
Description copied from interface:IQueue
Get (but don't remove) the element at the front of the queue. -
toString
-