Instance Method

valueForKey:

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

Declaration

- (id)valueForKey:(NSString *)key;

Parameters

key

The name of one of the properties of the receiving set's members.

Return Value

A set containing the results of invoking valueForKey: (with the argument key) on each of the receiving set's members.

Discussion

The returned set might not have the same number of members as the receiving set. The returned set will not contain any elements corresponding to instances of valueForKey: returning nil (note that this is in contrast with NSArray’s implementation, which may put NSNull values in the arrays it returns).

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.

- isEqualToSet:

Compares the receiving set to another set.

- setValue:forKey:

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software