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"));
| element |
the element to search for. |
|
true if the element is found. |