public class PriorityQueues
extends java.lang.Object
PriorityQueue
Modifier and Type | Class and Description |
---|---|
static class |
PriorityQueues.EmptyPriorityQueue
An immutable class representing the empty priority queue.
|
static class |
PriorityQueues.SynchronizedPriorityQueue<K>
A synchronized wrapper class for priority queues.
|
Modifier and Type | Field and Description |
---|---|
static PriorityQueues.EmptyPriorityQueue |
EMPTY_QUEUE
An empty indirect priority queue (immutable).
|
Modifier and Type | Method and Description |
---|---|
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,
java.lang.Object sync)
Returns a synchronized priority queue backed by the specified priority queue, using an assigned object to synchronize.
|
public static final PriorityQueues.EmptyPriorityQueue EMPTY_QUEUE
public static <K> PriorityQueue<K> synchronize(PriorityQueue<K> q)
q
- the priority queue to be wrapped in a synchronized priority queue.public static <K> PriorityQueue<K> synchronize(PriorityQueue<K> q, java.lang.Object sync)
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.