Adds an element to the set. If the element already exists, the set is not modified.
Example:
var set = new HashSet<string> (GLib.str_hash, GLib.str_equal);
assert (set.add ("apple"));
assert (!set.add ("apple"));
assert (set.size () == 1);
| element |
the element to add. |
|
true if the element was added, false if already present. |