ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/FoundationKit/Classes/NSMutableSet.rtf

This is NSMutableSet.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s8 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSMutableSet 
pard s18 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSSet : NSObject
fs20 
fs28 s11 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying, NSMutableCopying (NSSet)
fi0 NSObject (NSObject)
fs20 
fs28 s12 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSSet.h 
fs20 
fs28 pard s32 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s2 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 The NSMutableSet class declares the programmatic interface to an object that manages a mutable set of objects. NSMutableSet provides support for the mathematical concept of a i seti0 . A set, both in its mathematical sense, and in the OpenStep implementation of NSMutableSet, is an i unorderedi0  collection of distinct elements. OpenStep also provides the NSCountedSet class for a mutable set that can contain multiple instances of the same element, and provides the NSSet class for creating and managing immutable sets. In general, you should use NSSet unless you really need a mutable set.
fs16 
fs28 Use set objects as an alternative to array objects when the order of elements is not important, but performance in testing whether an object is contained in the set i isi0  a consideration'd0while arrays are ordered, testing for membership is slower than with sets.
fs16 
fs28 Objects in a set must respond to b hashb0  and b isEqual:b0  methods. See the NSObject protocol for details on b hashb0  and b isEqual:b0 .
fs16 
fs28 Generally, you instantiate an NSMutableSet object by sending one of the b set'bcb0  methods to the NSMutableSet class object, as described in the method descriptions for NSSet. These methods return an NSMutableSet object containing the elements (if any) you pass in as arguments. Newly created instances of NSMutableSet created by invoking the b setb0  method can be populated with objects using any of the b init'bcb0  methods. b initWithObjects::b0  is the designated initializer for this class.
fs16 
fs28 Objects are added to an NSMutableSet using b addObject:b0 , which adds a single specified object to the set,b  addObjectsFromArray:b0 , which adds all objects from a specified array to the set, or byb  unionSet:b0 , which adds all the objects from another set to this set.
fs16 
fs28 Objects are removed from an NSMutableSet using any of the methodsb  intersectSet:b0 , b minusSet:b0 ,b  removeAllObjectsb0 tab , or b removeObject:b0 .
fs16 
fs28 pard s32 li100 fi0 ri1007 ql f0 b fs24 
fs28 Allocating and Initializing an NSMutableSet
fs14 
fs28 pard s13 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (id)b allocWithZone:b0 (NSZone *)i zonei0 tab Creates and returns an uninitialized set object in i zone.
fi-6552 i0 fs16 
fs28 fi-6552 + (id)b setWithCapacity:b0 (unsigned)i numItemsi0 tab Creates and returns a set object, giving it enough allocated memory to hold i numItemsi0  objects.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b initWithCapacity:b0 (unsigned)i numItemsi0 tab Initializes a newly allocated set object, giving it enough allocated memory to hold i numItemsi0  objects.
pard s32 li100 fi0 ri1007 ql f0 b fs48 
fs28 Adding Objectstab 
fs14 
fs28 pard s13 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b addObject:b0 (id)i objecti0 tab Adds i objecti0  to the set, unless i object i0 is equal to some object already in the set.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b addObjectsFromArray:b0 (NSArray *)i arrayi0 tab Adds to the set all the objects in i arrayi0 , by calling b addObject:b0  for each one.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b unionSet:b0 (NSSet *)i other i0 tab Adds to the receiving set all the objects in i otheri0 , by calling b addObject:b0  for each one.
pard s32 li100 fi0 ri1007 ql f0 b fs48 
fs28 Removing Objects
fs14 
fs28 pard s13 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b intersectSet:b0 (NSSet *)i otheri0 tab Removes from the receiving set every object that'27s not equal to any object in i otheri0 , by calling b removeObject:b0  for each one.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b minusSet:b0 (NSSet *)i otheri0 tab Removes from the receiving set every object that'27s equal to some object in i otheri0 , by calling b removeObject:b0  for each one.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b removeAllObjectsb0 tab Empties the set of all its elements. (This method doesn'27t callb  removeObject:b0 .)
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b removeObject:b0 (id)i objecti0 tab If any member of the receiving set is equal to i objecti0 , this method removes that object from the set.
fi-6552 fs16 
fs28 fi-6552 
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.