A queue only allows data access based on first-in-first-out (FIFO) order. Similar to List, it's self-scalable.
Parent Class
Parent Interfaces
Type | Name | Signature |
---|---|---|
constructor | Queue | public Queue() |
method | dequeue | public var dequeue() |
method | enqueue | public void enqueue(var) |
method | size | public int size() |
public Queue()
Create a new queue.
public var dequeue()
Remove an element from the head of queue.
Returns
public void enqueue(var ele)
Add a new element to the tail of queue.
Parameters
public int size()
Get the current size of the queue.
Returns