public class PriorityQueues
extends java.lang.Object
PriorityQueue| Modifier and Type | Class | 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 | Description |
|---|---|---|
static PriorityQueues.EmptyPriorityQueue |
EMPTY_QUEUE |
An empty indirect priority queue (immutable).
|
| Modifier and Type | Method | Description |
|---|---|---|
static <K> PriorityQueue<K> |
emptyQueue() |
Returns an empty queue (immutable).
|
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> emptyQueue()
This method provides a typesafe access to EMPTY_QUEUE.
K - the class of the objects in the queue.public static <K> PriorityQueue<K> synchronize(PriorityQueue<K> q)
K - the class of the objects in the queue.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)
K - the class of the objects in the queue.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.