Code example for PriorityQueue

0
        queues.add(new ArrayBlockingQueue<Boolean>(count, false));
        queues.add(new ArrayBlockingQueue<Boolean>(count, true));
        queues.add(new LinkedBlockingQueue<Boolean>());
        queues.add(new LinkedBlockingDeque<Boolean>());
        queues.add(new PriorityBlockingQueue<Boolean>());
        queues.add(new PriorityQueue<Boolean>());
        queues.add(new LinkedList<Boolean>());
        queues.add(new LinkedTransferQueue<Boolean>());
 
        // Following additional implementations are available from: 
        // http://gee.cs.oswego.edu/dl/concurrency-interest/index.html 
        // queues.add(new SynchronizedLinkedListQueue<Boolean>()); 
 
        // Avoid "first fast, second slow" benchmark effect. 
        Collections.shuffle(queues);
        return queues;
    } 
 
    void prettyPrintResults() { 
        List<String> classNames = new ArrayList<String>(results.keySet());
        Collections.sort(classNames);