IntPriorityQueue, PriorityQueue<java.lang.Integer>public static class IntPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements IntPriorityQueue
| Modifier and Type | Method | 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.
|
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() |
Checks whether this queue is empty.
|
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() |
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()
IntPriorityQueue
This 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<java.lang.Integer>public int size()
PriorityQueuesize in interface PriorityQueue<java.lang.Integer>public void clear()
PriorityQueueclear in interface PriorityQueue<java.lang.Integer>public void changed()
PriorityQueueThis default implementation just throws an UnsupportedOperationException.
changed in interface PriorityQueue<java.lang.Integer>public IntComparator comparator()
IntPriorityQueue
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface IntPriorityQueuecomparator in interface 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 PriorityQueue<java.lang.Integer>x - the element to enqueue.@Deprecated public java.lang.Integer dequeue()
IntPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface IntPriorityQueuedequeue in interface 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 PriorityQueue<java.lang.Integer>@Deprecated public java.lang.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<java.lang.Integer>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object