poll


Description:

public T poll ()

Removes and returns the highest-priority (smallest) element. Returns null if the queue is empty.

Example:

    var pq = new PriorityQueue<string> ((a, b) => {
return strcmp (a, b);
});
pq.add ("b");
pq.add ("a");
assert (pq.poll () == "a");

Returns:

the smallest element, or null if empty.