Returns a new set containing only elements that are in both this set and the other set.
Example:
var a = new HashSet<string> (GLib.str_hash, GLib.str_equal);
a.add ("1");
a.add ("2");
var b = new HashSet<string> (GLib.str_hash, GLib.str_equal);
b.add ("2");
b.add ("3");
var i = a.intersection (b);
assert (i.size () == 1);
assert (i.contains ("2"));
| other |
the other set. |
|
a new set representing the intersection. |