it.unimi.dsi.fastutil
Class PriorityQueues

java.lang.Object
  extended by it.unimi.dsi.fastutil.PriorityQueues

public class PriorityQueues
extends Object

A class providing static methods and objects that do useful things with priority queues.

See Also:
PriorityQueue

Nested Class Summary
static class PriorityQueues.EmptyPriorityQueue
          An immutable class representing the empty priority queue.
static class PriorityQueues.SynchronizedPriorityQueue<K>
          A synchronized wrapper class for priority queues.
 
Field Summary
static PriorityQueues.EmptyPriorityQueue EMPTY_QUEUE
          An empty indirect priority queue (immutable).
 
Method Summary
static
<K> PriorityQueue<K>
synchronize(PriorityQueue<K> q)
          Returns a synchronized priority queue backed by the specified priority queue.
static
<K> PriorityQueue<K>
synchronize(PriorityQueue<K> q, Object sync)
          Returns a synchronized priority queue backed by the specified priority queue, using an assigned object to synchronize.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_QUEUE

public static final PriorityQueues.EmptyPriorityQueue EMPTY_QUEUE
An empty indirect priority queue (immutable).

Method Detail

synchronize

public static <K> PriorityQueue<K> synchronize(PriorityQueue<K> q)
Returns a synchronized priority queue backed by the specified priority queue.

Parameters:
q - the priority queue to be wrapped in a synchronized priority queue.
Returns:
a synchronized view of the specified priority queue.

synchronize

public static <K> PriorityQueue<K> synchronize(PriorityQueue<K> q,
                                               Object sync)
Returns a synchronized priority queue backed by the specified priority queue, using an assigned object to synchronize.

Parameters:
q - the priority queue to be wrapped in a synchronized priority queue.
sync - an object that will be used to synchronize the access to the priority queue.
Returns:
a synchronized view of the specified priority queue.