difference


Description:

public HashSet<T> difference (HashSet<T> other)

Returns a new set containing elements that are in this set but not in 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 d = a.difference (b);
assert (d.size () == 1);
assert (d.contains ("1"));

Parameters:

other

the other set.

Returns:

a new set representing the difference.