NSSet (EDExtensions)


Declared In:
NSSet+Extensions.h


Category Description

Various common extensions to NSSet.


Method Types

Adding objects
- setByAddingObjectsFromSet:
- setByAddingObjectsFromArray:
Mapping the set
- setByMappingWithDictionary:
- setByMappingWithSelector:
- setByMappingWithSelector:withObject:

Instance Methods

setByAddingObjectsFromArray:

- (NSSet *)setByAddingObjectsFromArray:(NSArray *)anArray

Adds all objects from anArray to the receiver.


setByAddingObjectsFromSet:

- (NSSet *)setByAddingObjectsFromSet:(NSSet *)otherSet

Adds all objects from otherSet to the receiver.


setByMappingWithDictionary:

- (NSSet *)setByMappingWithDictionary:(NSDictionary *)mapping

Uses each object in the receiver as a key and looks up the corresponding value in mapping. All these values are added to the set returned. Note that this method raises an exception if any of the objects in the receiver is not found as a key in mapping. Note also, that the returned set can be smaller than the receiver.


setByMappingWithSelector:

- (NSSet *)setByMappingWithSelector:(SEL)selector

Invokes the method described by selector in each object in the receiver. All returned values are added to the set returned. Note that the returned set can be smaller than the receiver.


setByMappingWithSelector:withObject:

- (NSSet *)setByMappingWithSelector:(SEL)selector withObject:(id)object

Invokes the method described by selector in each object in the receiver passing object as an argument. All returned values are added to the set returned. Note that the returned set can be smaller than the receiver.


Version 2.0 Copyright ©2002. All Rights Reserved.