net.sf.zig_project.gpl.common.queue
Class PriorityQueue
java.lang.Object
net.sf.zig_project.gpl.common.queue.PriorityQueueBase
net.sf.zig_project.gpl.common.queue.GenericPriorityQueue
net.sf.zig_project.gpl.common.queue.PriorityQueue
- All Implemented Interfaces:
- OrderedBlockingQueue, OrderedQueue, Queue
- public class PriorityQueue
- extends GenericPriorityQueue
- implements OrderedQueue
Single threaded, concrete implementation of a Priority Queue. Elements
can be queued, collected, and prioritized prior to processing, then
dequeued later by the same thread. (This class is not thread safe.)
- Version:
- January 20, 2005
- Author:
- Frank Ziglar
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PriorityQueue
public PriorityQueue(GenericQueue[] qs)
PriorityQueue
public PriorityQueue(int max_pri)
- Convenience constructor for creating a priority queue, given the
maximum priority it should support. The underlying queues
are Fifo ordered LinkedQueues.
- Parameters:
max_pri
- the maximum priority this queue should support (inclusive).
removeNext
public Object removeNext()
- Description copied from interface:
OrderedQueue
- Removes the next Object from the queue. This method always
returns immediately. If the Queue is empty at the time this
method is called, it will return null instead of waiting.
- Specified by:
removeNext
in interface OrderedQueue