2
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
3
<gsdoc base="NSDictionary" prev="NSDeserializer" next="NSDirectoryEnumerator" up="Base">
5
<title>NSDictionary</title>
6
<author name="Richard Frith-Macdonald">
7
<email address="rfm@gnu.org"/>
8
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
10
<author name="Pierre-Yves Rivaille">
11
<email address="pyhrr@altern.org"/>
12
<url url="http://altern.org/pyhrr"/>
14
<version>$Revision: 1.10 $</version>
15
<date>$Date: 2001/07/16 19:39:21 $</date>
19
<heading>NSDictionary</heading>
20
<class name="NSDictionary" super="NSObject">
21
<declared>Foundation/NSDictionary.h</declared>
22
<conform>NSCoding, NSCopying, NSMutableCopying</conform>
27
<method type="id" factory="yes">
28
<sel>allocWithZone:</sel>
29
<arg type="NSZone*">zone</arg>
33
<method type="id" factory="yes">
36
Returns an empty dictionary.
39
<method type="id" factory="yes">
40
<sel>dictionaryWithContentsOfFile:</sel>
41
<arg type="NSString*">path</arg>
43
Returns a dictionary using the file located at path.
44
The file must be a property list containing a dictionary as its root object.
47
<method type="id" factory="yes">
48
<sel>dictionaryWithDictionary:</sel>
49
<arg type="NSDictionary*">otherDictionary</arg>
51
Returns a newly created dictionary with the keys and objects of otherDictionary.
52
(The keys and objects are not copied.)
55
<method type="id" factory="yes">
56
<sel>dictionaryWithObject:</sel>
57
<arg type="id">anObject</arg>
59
<arg type="id">aKey</arg>
61
Returns a dictionary containing only one object (anObject) which is associated with aKey.
64
<method type="id" factory="yes">
65
<sel>dictionaryWithObjects:</sel>
66
<arg type="NSArray*">objects</arg>
68
<arg type="NSArray*">keys</arg>
70
Returns a dictionary created using the given objects and keys.
71
The two arrays must have the same size.
72
The n th element of the objects array is associated with the n th element of the keys array.
75
<method type="id" factory="yes">
76
<sel>dictionaryWithObjects:</sel>
77
<arg type="id*">objects</arg>
79
<arg type="id*">keys</arg>
81
<arg type="unsigned int">count</arg>
83
Returns a dictionary created using the C arrays objects and keys.
84
The number of elements in both C arrays must be count.
87
<method type="id" factory="yes">
88
<sel>dictionaryWithObjectsAndKeys:</sel>
89
<arg type="id">object, ...</arg>
91
Returns a dictionary created using the list given as argument.
92
The list is alernately composed of objects and keys.
93
Thus, the list's length must be pair.
96
<method type="NSArray*">
99
Returns an array containing all the dictionary's keys.
102
<method type="NSArray*">
103
<sel>allKeysForObject:</sel>
104
<arg type="id">anObject</arg>
106
Returns an array containing all the dictionary's keys that are associated with anObject.
109
<method type="NSArray*">
112
Returns an array containing all the dictionary's objects.
115
<method type="unsigned int">
118
Returns an unsigned integer which is the number of elements stored in the dictionary.
121
<method type="NSString*">
122
<sel>descriptionInStringsFileFormat</sel>
127
<method type="NSString*">
128
<sel>descriptionWithLocale:</sel>
129
<arg type="NSDictionary*">locale</arg>
134
<method type="NSString*">
135
<sel>descriptionWithLocale:</sel>
136
<arg type="NSDictionary*">locale</arg>
141
<method type="NSString*">
142
<sel>fileGroupOwnerAccountName</sel>
147
<method type="NSDate*">
148
<sel>fileModificationDate</sel>
153
<method type="NSString*">
154
<sel>fileOwnerAccountName</sel>
159
<method type="unsigned long">
160
<sel>filePosixPermissions</sel>
165
<method type="unsigned long long">
171
<method type="unsigned long">
172
<sel>fileSystemFileNumber</sel>
177
<method type="unsigned long">
178
<sel>fileSystemNumber</sel>
183
<method type="NSString*">
190
<sel>initWithContentsOfFile:</sel>
191
<arg type="NSString*">path</arg>
193
see dictionaryWithContentOfFile:
197
<sel>initWithDictionary:</sel>
198
<arg type="NSDictionary*">otherDictionary</arg>
200
See dictionaryWithDictionary:
204
<sel>initWithObjects:</sel>
205
<arg type="NSArray*">objects</arg>
207
See <ref id="dictionaryWithObjects:">dictionaryWithObjects:</ref>
212
<sel>initWithObjects:</sel>
213
<arg type="id*">objects</arg>
215
<arg type="id*">keys</arg>
217
<arg type="unsigned int">count</arg>
219
see dictionaryWithObjects: forKeys: count:
223
<sel>initWithObjectsAndKeys:</sel>
224
<arg type="id">object,</arg>
226
see dictionaryWithObjectsAndKeys:
230
<sel>isEqualToDictionary:</sel>
231
<arg type="NSDictionary*">otherDictionary</arg>
236
<method type="NSEnumerator*">
237
<sel>keyEnumerator</sel>
239
Return an enumerator object containing all the keys of the dictionary.
242
<method type="NSArray*">
243
<sel> keysSortedByValueUsingSelector:</sel>
244
<arg type="SEL">comparator</arg>
249
<method type="NSEnumerator*">
250
<sel>objectEnumerator</sel>
252
Return an enumerator object containing all the keys of the dictionary.
256
<sel>objectForKey:</sel>
257
<arg type="id">aKey</arg>
259
Returns the first object which has aKey as key.
262
<method type="NSArray*">
263
<sel>objectsForKeys:</sel>
264
<arg type="NSArray*">keys</arg>
265
<sel>notFoundMarker:</sel>
266
<arg type="id">anObject</arg>
272
<sel>writeToFile:</sel>
273
<arg type="NSString*">path</arg>
274
<sel>atomically:</sel>
275
<arg type="BOOL">flag</arg>
281
<sel>writeToURL:</sel>
282
<arg type="NSURL*">url</arg>
283
<sel>atomically:</sel>
284
<arg type="BOOL">flag</arg>