magi.toolkit.util.queue
Class LIFOQueue

java.lang.Object
  |
  +--magi.toolkit.util.queue.Stack
        |
        +--magi.toolkit.util.queue.LIFOQueue
All Implemented Interfaces:
Queue

public class LIFOQueue
extends Stack
implements Queue

An implementation of a "Last In, First Out" Queue. Basically, a LIFO Queue is a Stack.

Author:
Paul Atkinson, Magi Systems Pty Ltd.

Constructor Summary
LIFOQueue()
          Default constructor.
LIFOQueue(java.lang.Object[] objects)
          Creates the LIFO Queue pre-populated with an array of Objects.
 
Methods inherited from class magi.toolkit.util.queue.Stack
isEmpty, peek, peekAll, pop, popAll, push, pushAll, remove, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface magi.toolkit.util.queue.Queue
isEmpty, peek, peekAll, pop, popAll, push, pushAll, remove, size
 

Constructor Detail

LIFOQueue

public LIFOQueue()
Default constructor.


LIFOQueue

public LIFOQueue(java.lang.Object[] objects)
Creates the LIFO Queue pre-populated with an array of Objects. The elements are queued from left to right, where element 0 is queued first, element 1 is queued next, and so on. The last array element will then be popped first.

Parameters:
objects - an array of Objects to populate with.