[Previous] [Up] [Next]

NSMutableSet

Authors

Richard Frith-Macdonald

Version: $Revision$

Date: $Date$

NSMutableSet

NSMutableSet

Declared in: Foundation/NSSet.h

Inherits from: NSSet

Conforms to: NSCoding


Instance Variables

Methods


Class Methods

allocWithZone:

+ (id) allocWithZone: (NSZone*)zone;

setWithCapacity:

+ (id) setWithCapacity: (unsigned int)numItems;


Instances Methods

addObject:

- (void) addObject: (id)anObject;
Adds the specified object to the receiver. The object is retained by the set.

addObjectsFromArray:

- (void) addObjectsFromArray: (NSArray*)anArray;
Adds all the objects in the array to the receiver.

initWithCapacity:

- (id) initWithCapacity: (unsigned int)numItems;
Initialises the receiver to be ready to have the specified number of items added to it. Additions of items to a set initialised with an appropriate capacity will be more efficient than addition of items otherwise.

intersectSet:

- (void) intersectSet: (NSSet*)otherSet;
Removes from the receiver all the objects it contains which are not also in otherSet.

minusSet:

- (void) minusSet: (NSSet*)otherSet;
Removes from the receiver all the objects that are in otherSet.

removeAllObjects

- (void) removeAllObjects;
Removes all objects from the receiver.

removeObject:

- (void) removeObject: (id)anObject;
Removes the specified object from the receiver.

setSet:

- (void) setSet: (NSSet*)otherSet;
Standards: GNUstep MacOS-X NotOpenStep
Removes all objects from the receiver then adds the objects from otherSet. If the receiver is otherSet, the method has no effect.

unionSet:

- (void) unionSet: (NSSet*)otherSet;
Adds all the objects from etherSet to the receiver.