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 this 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()
IntPriorityQueueThis default implementation just throws an UnsupportedOperationException.
lastInt in interface IntPriorityQueueIntPriorityQueue.last()public boolean isEmpty()
PriorityQueueThis default implementation checks whether PriorityQueue.size() is zero.
isEmpty in interface PriorityQueue<Integer>public int size()
PriorityQueuesize in interface PriorityQueue<Integer>public void clear()
PriorityQueueclear in interface PriorityQueue<Integer>public void changed()
PriorityQueueThis default implementation just throws an UnsupportedOperationException.
changed in interface PriorityQueue<Integer>public IntComparator comparator()
IntPriorityQueueNote 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)
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface IntPriorityQueueenqueue in interface PriorityQueue<Integer>x - the element to enqueue.@Deprecated public Integer dequeue()
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface IntPriorityQueuedequeue in interface PriorityQueue<Integer>@Deprecated public Integer first()
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface IntPriorityQueuefirst in interface PriorityQueue<Integer>@Deprecated public Integer last()
IntPriorityQueueThis default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
last in interface IntPriorityQueuelast in interface PriorityQueue<Integer>