public abstract class AbstractPriorityQueue<K> extends Object implements PriorityQueue<K>
PriorityQueue interface.
This class defines changed() and last() as throwing an
UnsupportedOperationException.
| Constructor and Description |
|---|
AbstractPriorityQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
changed()
Notifies the queue that the first element has changed (optional operation).
|
boolean |
isEmpty()
Checks whether the queue is empty.
|
K |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, comparator, dequeue, enqueue, first, sizepublic void changed()
PriorityQueuechanged in interface PriorityQueue<K>public K last()
PriorityQueuelast in interface PriorityQueue<K>public boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<K>