Facemorph
Interface IPQ

All Known Implementing Classes:
PQ

public interface IPQ

Priority Queue interface


Method Summary
 void add(java.lang.Comparable c)
          add to the queue
 void clear()
          Empty the queue
 java.lang.Comparable inspectLeast()
          look but don't remove
 boolean isEmpty()
          is the queue empty?
 java.lang.Comparable removeLeast()
          remove from the queue
 int size()
          Returns the size of the queue
 

Method Detail

add

void add(java.lang.Comparable c)
add to the queue

Parameters:
c - the object to add

removeLeast

java.lang.Comparable removeLeast()
remove from the queue

Returns:
the smallest object

inspectLeast

java.lang.Comparable inspectLeast()
look but don't remove

Returns:
the smallest object

isEmpty

boolean isEmpty()
is the queue empty?

Returns:
return true if the list is empty

size

int size()
Returns the size of the queue

Returns:
the number of objects in the queue

clear

void clear()
Empty the queue