public abstract class AbstractIndirectPriorityQueue<K> extends Object implements IndirectPriorityQueue<K>
IndirectPriorityQueue interface.
This class defines changed(int), allChanged(), remove(int) and last() as throwing an
UnsupportedOperationException.
| Constructor and Description |
|---|
AbstractIndirectPriorityQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
allChanged()
Notifies this queue that the all elements have changed (optional operation).
|
void |
changed()
Notifies this queue that the first element has changed (optional operation).
|
void |
changed(int index)
Notifies this queue that the specified element has changed (optional operation).
|
boolean |
contains(int index)
Checks whether a given index belongs to this queue (optional operation).
|
boolean |
isEmpty()
Checks whether this queue is empty.
|
int |
last()
Returns the last element of this queue, that is, the element the would be dequeued last (optional operation).
|
boolean |
remove(int index)
Removes the specified element from this queue (optional operation).
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, comparator, dequeue, enqueue, first, front, sizepublic int last()
IndirectPriorityQueuelast in interface IndirectPriorityQueue<K>public void changed()
IndirectPriorityQueuechanged in interface IndirectPriorityQueue<K>public void changed(int index)
IndirectPriorityQueueNote that the specified element must belong to this queue.
changed in interface IndirectPriorityQueue<K>index - the element that has changed.public void allChanged()
IndirectPriorityQueueallChanged in interface IndirectPriorityQueue<K>public boolean remove(int index)
IndirectPriorityQueueremove in interface IndirectPriorityQueue<K>index - the element to be removed.public boolean contains(int index)
IndirectPriorityQueuecontains in interface IndirectPriorityQueue<K>index - an index possibly in the queue.public boolean isEmpty()
IndirectPriorityQueueisEmpty in interface IndirectPriorityQueue<K>