Class PriorityQueueAbstract<E>

  • Direct Known Subclasses:
    NonpriorityQueue, PriorityQueueRelaxed, PriorityQueueStrict

    public abstract class PriorityQueueAbstract<E>
    extends Object
    Works like a LinkedBlockingQueue using the put() and take() methods but with an additional priority integer parameter. The elemnt returned from take() will honor the priority in such a way that all elements of a lower priority will be returned before any elemens of a higher priority.
    Modified proposition taken from Noa Resare: http://resare.com/noa/ref/MultiPrioQueue.java
    Author:
    Artur Hefczyc