public interface IntPriorityQueue extends PriorityQueue<Integer>
PriorityQueue; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens comparator().
| Modifier and Type | Method and Description |
|---|---|
IntComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
|
int |
dequeueInt()
Dequeues the first element from the queue.
|
void |
enqueue(int x)
Enqueues a new element.
|
int |
firstInt()
Returns the first element of the queue.
|
int |
lastInt()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
void enqueue(int x)
x - the element to enqueue.int dequeueInt()
NoSuchElementException - if the queue is empty.int firstInt()
NoSuchElementException - if the queue is empty.int lastInt()
NoSuchElementException - if the queue is empty.IntComparator comparator()
Note that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface PriorityQueue<Integer>null if it uses its elements' natural ordering.PriorityQueue.comparator()