public static class LongPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements LongPriorityQueue
| Modifier and Type | Field and Description |
|---|---|
protected LongPriorityQueue |
q |
protected java.lang.Object |
sync |
| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizedPriorityQueue(LongPriorityQueue q) |
protected |
SynchronizedPriorityQueue(LongPriorityQueue q,
java.lang.Object sync) |
| Modifier and Type | Method and Description |
|---|---|
void |
changed() |
void |
clear() |
it.unimi.dsi.fastutil.longs.LongComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
|
java.lang.Long |
dequeue()
Deprecated.
|
long |
dequeueLong()
Dequeues the first element from the queue.
|
void |
enqueue(long x)
Enqueues a new element.
|
void |
enqueue(java.lang.Long x)
Deprecated.
|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
first()
Deprecated.
|
long |
firstLong()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty() |
java.lang.Long |
last()
Deprecated.
|
long |
lastLong()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
int |
size() |
protected final LongPriorityQueue q
protected final java.lang.Object sync
protected SynchronizedPriorityQueue(LongPriorityQueue q, java.lang.Object sync)
protected SynchronizedPriorityQueue(LongPriorityQueue q)
public void enqueue(long x)
LongPriorityQueueenqueue in interface LongPriorityQueuex - the element to enqueue.PriorityQueue.enqueue(Object)public long dequeueLong()
LongPriorityQueuedequeueLong in interface LongPriorityQueueLongPriorityQueue.dequeue()public long firstLong()
LongPriorityQueuefirstLong in interface LongPriorityQueueLongPriorityQueue.first()public long lastLong()
LongPriorityQueueThis default implementation just throws an UnsupportedOperationException.
lastLong in interface LongPriorityQueueLongPriorityQueue.last()public boolean isEmpty()
isEmpty in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>public int size()
size in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>public void clear()
clear in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>public void changed()
changed in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>public it.unimi.dsi.fastutil.longs.LongComparator comparator()
LongPriorityQueuecomparator in interface LongPriorityQueuecomparator in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>PriorityQueue.comparator()@Deprecated public void enqueue(java.lang.Long x)
LongPriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface LongPriorityQueueenqueue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>@Deprecated public java.lang.Long dequeue()
LongPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface LongPriorityQueuedequeue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>@Deprecated public java.lang.Long first()
LongPriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface LongPriorityQueuefirst in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>@Deprecated public java.lang.Long last()
LongPriorityQueueThis default implementation delegates to the corresponding type-specific method.
last in interface LongPriorityQueuelast in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Long>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object