contains


Description:

public bool contains (T element)

Returns whether the queue contains the specified element.

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 ("apple");
assert (pq.contains ("apple"));
assert (!pq.contains ("banana"));

Parameters:

element

the element to search for.

Returns:

true if the element is found.