Instance Method

isEqualToSet:

Compares the receiving set to another set.

Declaration

- (BOOL)isEqualToSet:(NSSet<ObjectType> *)otherSet;

Parameters

otherSet

The set with which to compare the receiving set.

Return Value

YES if the contents of otherSet are equal to the contents of the receiving set, otherwise NO.

Discussion

Two sets have equal contents if they each have the same number of members and if each member of one set is present in the other. Object equality is tested using isEqual:.

See Also

Comparing Sets

- isSubsetOfSet:

Returns a Boolean value that indicates whether every object in the receiving set is also present in another given set.

- intersectsSet:

Returns a Boolean value that indicates whether at least one object in the receiving set is also present in another given set.

- valueForKey:

Return a set containing the results of invoking valueForKey: on each of the receiving set's members.

- setValue:forKey:

Invokes setValue:forKey: on each of the set’s members.