Abstract supertype of datastructures that can be used as FIFO queues.

A Queue has a well-defined front and back. Elements may be added to the back of the queue by offer(), and removed from the front of the queue by accept().

Note that many Queues are also Lists, but there is no defined relationship between the order of elements in the list and the direction of the queue. In particular, the front of the queue may be first element of the list, or it may be the last element of the list.

no type hierarchy

no supertypes hierarchy

Attributes
backSource Codeshared formal Element? back

The element currently at the back of the queue, or null if the queue is empty.

frontSource Codeshared formal Element? front

The element currently at the front of the queue, or null if the queue is empty.

Inherited Attributes
Attributes inherited from: Object
Methods
acceptSource Codeshared formal Element? accept()

Remove and return the element at the front of the queue.

offerSource Codeshared formal void offer(Element element)

Add a new element to the back of the queue.

Inherited Methods
Methods inherited from: Object