equals


Description:

public bool equals (Pair<A,B> other, EqualFunc<A> equal_a, EqualFunc<B> equal_b)

Returns whether this Pair is equal to another Pair. Both the first and second values must be equal.

Requires equality functions for both types because Vala generics use pointer comparison by default.

Example:

    var a = new Pair<string,string> ("x", "y");
var b = new Pair<string,string> ("x", "y");
assert (a.equals (b, GLib.str_equal, GLib.str_equal));

Parameters:

other

the other Pair to compare.

equal_a

the equality function for the first type.

equal_b

the equality function for the second type.

Returns:

true if both values are equal.