it.unimi.dsi.fastutil
Class AbstractPriorityQueue<K>

java.lang.Object
  extended by it.unimi.dsi.fastutil.AbstractPriorityQueue<K>
All Implemented Interfaces:
PriorityQueue<K>
Direct Known Subclasses:
AbstractBytePriorityQueue, AbstractCharPriorityQueue, AbstractDoublePriorityQueue, AbstractFloatPriorityQueue, AbstractIntPriorityQueue, AbstractLongPriorityQueue, AbstractShortPriorityQueue, ObjectArrayPriorityQueue, ObjectHeapPriorityQueue, PriorityQueues.EmptyPriorityQueue

public abstract class AbstractPriorityQueue<K>
extends Object
implements PriorityQueue<K>

An abstract class providing basic methods for implementing the PriorityQueue interface.

This class defines changed() and last() as throwing an UnsupportedOperationException.


Constructor Summary
AbstractPriorityQueue()
           
 
Method Summary
 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).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.PriorityQueue
clear, comparator, dequeue, enqueue, first, size
 

Constructor Detail

AbstractPriorityQueue

public AbstractPriorityQueue()
Method Detail

changed

public void changed()
Description copied from interface: PriorityQueue
Notifies the queue that the first element has changed (optional operation).

Specified by:
changed in interface PriorityQueue<K>

last

public K last()
Description copied from interface: PriorityQueue
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).

Specified by:
last in interface PriorityQueue<K>
Returns:
the last element.

isEmpty

public boolean isEmpty()
Description copied from interface: PriorityQueue
Checks whether the queue is empty.

Specified by:
isEmpty in interface PriorityQueue<K>
Returns:
true if the queue is empty.