(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSSet 

Inherits From:	NSObject 

Conforms To:	NSCopying
NSCoding
NSMutableCopying
NSObject 

Declared In:	foundation/NSSet.h 

Allocating and Initializing a Set

+ (id)allocWithZone:(NSZone *)zone	Creates and returns an uninitialized set object in zone.
+ (id)set	Creates and returns an empty set object.
+ (id)setWithArray:(NSArray *)array	Creates and returns a set object containing the objects in array.
+ (id)setWithObject:(id)anObject	Creates and returns a set object containing the single element anObject.
+ (id)setWithObjects:(id)firstObj,...	Creates and returns a set object containing the objects in the argument list. The object list is comma-separated and ends with nil.
- (id)initWithArray:(NSArray *)array	Initializes a newly allocated set object by placing in it the objects contained in array.
- (id)initWithObjects:(id)firstObj,...	Initializes a newly allocated set object by placing in it the objects in the argument list.  The object list is comma-separated and ends with nil.
- (id)initWithObjects:(id *)objects	Initializes a newly allocated set object by placing in 
count:(unsigned int)count		it count objects from the objects array.
- (id)initWithSet:(NSSet *)anotherSet	Initializes a newly allocated set object by placing in it the objects contained in anotherSet.
- (id)initWithSet:(NSSet *)set	Initializes a newly allocated set object by placing in it the
copyItems:(BOOL)flag		objects contained in anotherSet (or immutable copies of them, if flag is YES).

Querying the Set

- (NSArray *)allObjects	Returns an array containing all the objects in the set.
- (id)anyObject	Returns some object in the set, or nil if the set is empty.
- (unsigned int)count	Returns the number of objects currently in the set.
- (id)member:(id)anObject	Return the object in the set that is equal to anObject, or nil if none is equal.
- (NSEnumerator *)objectEnumerator	Returns an enumerator object that lets you access each object in the set.

 Sending Messages to Elements of the Set

- (void)makeObjectsPerform:(SEL)aSelector	Sends an aSelector message to each object in the set.
- (void)makeObjectsPerform:(SEL)aSelector	Sends an aSelector message to each object in the
withObject:(id)anObject		set, with anObject as an argument.

Comparing Sets

- (BOOL)intersectsSet:(NSSet *)otherSet	Returns YES if there's any object in the receiving set that's equal to an object in otherSet.
- (BOOL)isEqualToSet:(NSSet *)otherSet	Returns YES if every object in the receiving set is equal to an object in otherSet, and the two sets contain the same number of objects.
- (BOOL)isSubsetOfSet:(NSSet *)otherSet	Returns YES if every object in the receiving set is equal to an object in otherSet, and the receiving set contains no more objects than otherSet does.

Creating a String Description of the Set

- (NSString *)description	Returns a string object that describes the contents of the receiver.
- (NSString *)descriptionWithLocale:(NSDictionary *)localeDictionary
	Returns a string representation of the NSSet object, including the keys and values that represent the locale data from localeDictionary.