The abstract Queue class. There is not much you can do with it as queue has to be mutable to do anything useful.
inherits
State supers: Indexed
methods
boolean
queuep;
|
Return TRUE.
deferred boolean
emptyp;
|
Return TRUE for empty queues.
inherits
State supers: Queue, MutableIndexed
methods
deferred void add Any object; |
Push an object to the head of the queue.
deferred Any pop; |
Pop the object from the tail of the queue.
inherits
State supers: MutableQueue, Conditions
variables
The index into the contents of the element self[0].
The number of elements.
The array holding the actual objects.
methods
Any at int index pre index >= 0 && index < elements; |
Undocumented.
void set All object at int index pre index >= 0 && index < elements; |
Undocumented.
int
length;
|
Undocumented.
void add Any object; |
Add the object to the end.
boolean
emptyp;
|
Undocumented.
Any pop; |
Retrieve the object at self[0] and remove it. All in constant time, of course.
id (self)
empty;
|
Make the queue empty.