structure
Interface PriorityQueue

All Known Implementing Classes:
PriorityVector, SkewHeap, VectorHeap

public interface PriorityQueue

Interface describing an queue of prioritized values. This linear-like structure has values that are inserted in such a way as to allow them to be removed in increasing order.


Method Summary
 void add(Comparable value)
          Add a value to the priority queue.
 void clear()
          Remove all the elements from the queue.
 Comparable getFirst()
          Fetch lowest valued (highest priority) item from queue.
 boolean isEmpty()
          Determine if the queue is empty.
 Comparable remove()
          Returns the minimum value from the queue.
 int size()
          Determine the size of the queue.
 

Method Detail

getFirst

Comparable getFirst()
Fetch lowest valued (highest priority) item from queue.

Returns:
The smallest value from queue.

remove

Comparable remove()
Returns the minimum value from the queue.

Returns:
The minimum value in the queue.

add

void add(Comparable value)
Add a value to the priority queue.

Parameters:
value - The value to be added.

isEmpty

boolean isEmpty()
Determine if the queue is empty.

Returns:
True if the queue is empty.

size

int size()
Determine the size of the queue.

Returns:
The number of elements within the queue.

clear

void clear()
Remove all the elements from the queue.