it.unimi.dsi.fastutil
Class AbstractPriorityQueue

java.lang.Object
  extended byit.unimi.dsi.fastutil.AbstractPriorityQueue
All Implemented Interfaces:
PriorityQueue
Direct Known Subclasses:
AbstractBytePriorityQueue, AbstractCharPriorityQueue, AbstractDoublePriorityQueue, AbstractFloatPriorityQueue, AbstractIntPriorityQueue, AbstractLongPriorityQueue, AbstractShortPriorityQueue, ObjectArrayPriorityQueue, ObjectHeapPriorityQueue

public abstract class AbstractPriorityQueue
extends Object
implements PriorityQueue

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.
 Object 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

last

public Object 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
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
Returns:
true if the queue is empty.