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

This is NSMutableDictionary.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.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSMutableDictionary 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSDictionary : NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying, NSMutableCopying (NSDictionary)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSDictionary.h 
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 The NSMutableDictionary class declares the programmatic interface to objects that manage mutable associations of keys and values. With its two efficient primitive methods'd0b setObject:forKey:b0  and b removeObject:forKey:b0 'd0this class adds modification operations to the basic operations it inherits from NSDictionary.
fs16 
fs28 The other methods declared here operate by invoking one or both of these primitives. The derived methods provide convenient ways of adding or removing multiple entries at a time.
fs16 
fs28 When an entry is removed from a mutable dictionary, the key and value objects that make up the entry receive ab  releaseb0  message, which can cause them to be deallocated. Note that if your program keeps a reference to such objects, the reference will become invalid unless you remember to send the object a b retainb0  message before it'27s removed from the dictionary. For example, the third statement below could result in a run-time error, except for the b retainb0  message in the first statement:
fs16 
fs28 pard s5 li1231 fi0 ri1007 ql f2 fs20 id anObject = [[i aDictionaryi0  objectForKey:i theKeyi0 ] retain];
[i aDictionaryi0  removeObjectForKey:i theKeyi0 ];
[anObject i someMessagei0 ];
s16 li100 fi1130 fi0 f0 b fs28 fs48 
fs28 Allocating and Initializing 
fs14 
fs28 pard s8 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 NSMutableDictionary in i zonei0 .
fi-6552 fs16 
fs28 fi-6552 + (id)b dictionaryWithCapacity:b0 (unsigned int)i aNumItemsi0 tab 
s9 li7030 fi-6553 fi-5796 tab Creates and returns an NSMutableDictionary, giving it enough allocated memory to hold i numEntriesi0  entries.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b initWithCapacity:b0 (unsigned int)i aNumItemsi0 tab Initializes a newly allocated NSMutableDictionary, giving it enough allocated memory to hold i numEntriesi0  entries.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Adding and Removing Entries 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b addEntriesFromDictionary:b0 (NSDictionary *)i otherDictionaryi0 tab 
s9 li7030 fi-6553 fi-5796 tab Adds the entries from i otherDictionaryi0  to the receiver.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b removeAllObjectsb0 tab Empties the receiver of its entries.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b removeObjectForKey:b0 (id)i theKeyi0 tab Removes i theKeyi0  and its associated value object from the dictionary. Raises NSInvalidArgumentException if i aKeyi0  is b nilb0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b removeObjectsForKeys:b0 (NSArray *)i keyArray
s9 li7030 fi-6553 fi-5796 i0 tab Removes from the receiver one or more entries as identified by the keys in i keyArrayi0 .fs28  
s8 li7029 fi-5794 fi-6552 fs28 fs16 
fs28 fi-6552 {f3 -} (void)b setObject:b0 (id)i anObjecti0 tab Adds an entry to the receiver, consisting of i anObjecti0  and its 
s9 li7030 fi-6553 fi-5796 b forKey:b0 (id)i aKeyi0 tab tab corresponding key i aKeyi0 . Raises NSInvalidArgumentException if either i anObjecti0  or i aKeyi0  is b nil.
s8 li7029 fi-5794 fi-6552 b0 fs16 
fs28 fi-6552 {f3 -} (void)b setDictionary:b0 (NSDictionary *)i otherDictionary
s9 li7030 fi-6553 fi-5796 i0 tab Sets the contents of the receiver to the keys and values in i otheri0 .

}

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