remove


Description:

public bool remove (T element)

Removes the first occurrence of the specified element. Returns true if the element was found and removed.

Uses the equality function provided in the constructor, or pointer equality if none was provided.

Example:

    var pq = new PriorityQueue<string> ((a, b) => {
return strcmp (a, b);
}, GLib.str_equal);
pq.add ("a");
pq.add ("b");
assert (pq.remove ("b"));
assert (pq.size () == 1);

Parameters:

element

the element to remove.

Returns:

true if the element was removed.