public static class IntPriorityQueues.SynchronizedPriorityQueue extends Object implements IntPriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
changed()
Notifies the queue that the first element has changed (optional operation).
|
void |
clear()
Removes all elements from this queue.
|
IntComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it
uses its elements' natural ordering.
|
Integer |
dequeue()
Deprecated.
|
int |
dequeueInt()
Dequeues the first element from the queue.
|
void |
enqueue(int x)
Enqueues a new element.
|
void |
enqueue(Integer x)
Deprecated.
|
boolean |
equals(Object o) |
Integer |
first()
Deprecated.
|
int |
firstInt()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty()
Checks whether the queue is empty.
|
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()
Returns the number of elements in this queue.
|
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()
IntPriorityQueuelastInt in interface IntPriorityQueueIntPriorityQueue.last()public boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<Integer>public int size()
PriorityQueuesize in interface PriorityQueue<Integer>public void clear()
PriorityQueueclear in interface PriorityQueue<Integer>public void changed()
PriorityQueuechanged in interface PriorityQueue<Integer>public IntComparator comparator()
IntPriorityQueue
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface IntPriorityQueuecomparator in interface PriorityQueue<Integer>PriorityQueue.comparator()@Deprecated public void enqueue(Integer x)
IntPriorityQueueenqueue in interface IntPriorityQueueenqueue in interface PriorityQueue<Integer>x - the element to enqueue..@Deprecated public Integer dequeue()
IntPriorityQueuedequeue in interface IntPriorityQueuedequeue in interface PriorityQueue<Integer>@Deprecated public Integer first()
IntPriorityQueuefirst in interface IntPriorityQueuefirst in interface PriorityQueue<Integer>@Deprecated public Integer last()
IntPriorityQueuelast in interface IntPriorityQueuelast in interface PriorityQueue<Integer>