org.placelab.util
Interface PriorityQueue

All Known Implementing Classes:
DHeap

public interface PriorityQueue

Base interface for priority queue implementations.


Method Summary
 java.lang.Object deleteMin()
          Removes the minimum element from the priority queue.
 java.lang.Object findMin()
          Returns a reference to the minimum element in the priority queue
 void insert(java.lang.Object x)
          Inserts a new object to the priority queue
 boolean isEmpty()
          Returns true if priority queue has no elements
 void makeEmpty()
          Erases all elements from the priority queue.
 

Method Detail

isEmpty

public boolean isEmpty()
Returns true if priority queue has no elements

Returns:
true if the priority queue has no elements

findMin

public java.lang.Object findMin()
Returns a reference to the minimum element in the priority queue

Returns:
reference to the minimum element in the priority queue.

insert

public void insert(java.lang.Object x)
Inserts a new object to the priority queue

Parameters:
x - Object to be inserted into the priority queue.

deleteMin

public java.lang.Object deleteMin()
Removes the minimum element from the priority queue.

Returns:
reference to the minimum element.

makeEmpty

public void makeEmpty()
Erases all elements from the priority queue.