public abstract class AbstractPriorityQueue<K> extends java.lang.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, wait
clear, comparator, dequeue, enqueue, first, size
public void changed()
PriorityQueue
changed
in interface PriorityQueue<K>
public K last()
PriorityQueue
last
in interface PriorityQueue<K>
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue<K>