Opus5
Interface PriorityQueue
- All Superinterfaces:
- Comparable, Container
- All Known Subinterfaces:
- DoubleEndedPriorityQueue, MergeablePriorityQueue
- All Known Implementing Classes:
- BinaryHeap
- public interface PriorityQueue
- extends Container
Encapsulates methods common to all priority queues.
- Version:
- $Id: PriorityQueue.java,v 3.1 1998/07/28 01:32:17 brpreiss Exp $
- Author:
- Bruno R. Preiss, P.Eng.
|
Field Summary |
static java.lang.String |
copyright
|
copyright
public static final java.lang.String copyright
enqueue
public void enqueue(Comparable object)
- Enqueues the specified object in this priority queue.
- Parameters:
object - The object to be enqueued.- Throws:
ContainerFullException - If the queue is full.
findMin
public Comparable findMin()
- Returns the "smallest" object in this priority queue.
The smallest item in a priority queue is the one that is smaller
than all the rest.
- Returns:
- The smallest object in this priority queue.
- Throws:
ContainerEmptyException - If the priority queue is empty.
dequeueMin
public Comparable dequeueMin()
- Dequeues and returns the "smallest" object in this priority queue.
The smallest item in a priority queue is the one that is smaller
than all the rest.
- Returns:
- The smallest object in this priority queue.
- Throws:
ContainerEmptyException - If the priority queue is empty.