All Packages  Class Hierarchy  This Package  Previous  Next  Index  
Interface DataStructures.PriorityQueue
- public interface PriorityQueue
Protocol for priority queues.
 
 deleteMin() deleteMin()
- Remove the smallest item from the priority queue.
 findMin() findMin()
- Find the smallest item in the priority queue.
 insert(Comparable) insert(Comparable)
- Insert into the priority queue.
 isEmpty() isEmpty()
- Test if the priority queue is logically empty.
 makeEmpty() makeEmpty()
- Make the priority queue logically empty.
 
 insert
insert
public abstract void insert(Comparable x)
- Insert into the priority queue.
Duplicates are allowed.
 
- 
- Parameters:
- x - the item to insert.
 
 findMin
findMin
public abstract Comparable findMin() throws Underflow
- Find the smallest item in the priority queue.
 
- 
- Returns:
- the smallest item.
- Throws:
Underflow
- if the priority queue is empty.
 
 deleteMin
deleteMin
public abstract Comparable deleteMin() throws Underflow
- Remove the smallest item from the priority queue.
 
- 
- Throws:
Underflow
- if the priority queue is empty.
 
 makeEmpty
makeEmpty
public abstract void makeEmpty()
- Make the priority queue logically empty.
 
 isEmpty
isEmpty
public abstract boolean isEmpty()
- Test if the priority queue is logically empty.
 
- 
- Returns:
- true if empty, false otherwise.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index