public static class IntPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements IntPriorityQueue
| Modifier and Type | Field and Description |
|---|---|
protected IntPriorityQueue |
q |
protected java.lang.Object |
sync |
| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizedPriorityQueue(IntPriorityQueue q) |
protected |
SynchronizedPriorityQueue(IntPriorityQueue q,
java.lang.Object sync) |
| Modifier and Type | Method and Description |
|---|---|
void |
changed() |
void |
clear() |
it.unimi.dsi.fastutil.ints.IntComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
|
java.lang.Integer |
dequeue()
Deprecated.
|
int |
dequeueInt()
Dequeues the first element from the queue.
|
void |
enqueue(int x)
Enqueues a new element.
|
void |
enqueue(java.lang.Integer x)
Deprecated.
|
boolean |
equals(java.lang.Object o) |
java.lang.Integer |
first()
Deprecated.
|
int |
firstInt()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty() |
java.lang.Integer |
last()
Deprecated.
|
int |
lastInt()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
int |
size() |
protected final IntPriorityQueue q
protected final java.lang.Object sync
protected SynchronizedPriorityQueue(IntPriorityQueue q, java.lang.Object sync)
protected SynchronizedPriorityQueue(IntPriorityQueue q)
public void enqueue(int x)
IntPriorityQueueenqueue in interface IntPriorityQueuex - the element to enqueue.PriorityQueue.enqueue(Object)public int dequeueInt()
IntPriorityQueuedequeueInt in interface IntPriorityQueueIntPriorityQueue.dequeue()public int firstInt()
IntPriorityQueuefirstInt in interface IntPriorityQueueIntPriorityQueue.first()public int lastInt()
IntPriorityQueueThis default implementation just throws an UnsupportedOperationException.
lastInt in interface IntPriorityQueueIntPriorityQueue.last()public boolean isEmpty()
isEmpty in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>public int size()
size in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>public void clear()
clear in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>public void changed()
changed in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>public it.unimi.dsi.fastutil.ints.IntComparator comparator()
IntPriorityQueuecomparator in interface IntPriorityQueuecomparator in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>PriorityQueue.comparator()@Deprecated public void enqueue(java.lang.Integer x)
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface IntPriorityQueueenqueue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>@Deprecated public java.lang.Integer dequeue()
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface IntPriorityQueuedequeue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>@Deprecated public java.lang.Integer first()
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface IntPriorityQueuefirst in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>@Deprecated public java.lang.Integer last()
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
last in interface IntPriorityQueuelast in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Integer>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object