Class std.cont.Queue
Synopsis
public abstract class Queue< T > extends Container< T >
Represents an abstract queue.
This is a container which allows items to be added with the push()
method, and then
retrieved using pop()
on a first-in-first-out basis.
Fields
Constructors
Methods
public abstract void push(T element);
Push an element to the end of the queue.
public abstract T pop();
Pop and element from the front of the queue and return it.
public abstract int size();
Return the number of elements in the queue.
protected abstract T get(int index);
Return the element with the specified index (index zero referring to the front of the queue).
public final T opGet(int index);
Return the element with the specified index (index zero referring to the front of the queue).
protected abstract void set(int index,T value);
Set the element with the specified index to the specified value.
public final void opSet(int index,T value);
Set the element with the specified index to the specified value.