2000-03-05 17:39:33 +00:00
|
|
|
<html><head>
|
|
|
|
<title>NSDictionary</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a href="NSDeserializer.html">[Previous]</a>
|
2000-04-10 05:32:04 +00:00
|
|
|
<a href="Base.html">[Up]</a>
|
2000-03-05 17:39:33 +00:00
|
|
|
<a href="NSDirectoryEnumerator.html">[Next]</a>
|
|
|
|
<h1>NSDictionary</h1>
|
|
|
|
<h3>Authors</h3>
|
|
|
|
<dl>
|
|
|
|
<dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
|
|
|
|
<dd>
|
2000-05-08 20:45:47 +00:00
|
|
|
<dt><a href="http://altern.org/pyhrr">Pierre-Yves Rivaille</a>
|
|
|
|
<dd>
|
2000-03-05 17:39:33 +00:00
|
|
|
</dl>
|
2000-05-08 20:45:47 +00:00
|
|
|
<p>Version: 0.2</p>
|
|
|
|
<p>Date: 25 April, 2000</p>
|
2000-03-05 17:39:33 +00:00
|
|
|
<h2><a name="cont-0">NSDictionary</a></h2>
|
|
|
|
<h2><a name="NSDictionary">NSDictionary</a></h2>
|
|
|
|
<p><b>Declared in:</b> Foundation/NSDictionary.h</p>
|
|
|
|
<p><b>Inherits from:</b> NSObject</p>
|
2000-05-08 20:45:47 +00:00
|
|
|
<p><b>Conforms to:</b> NSCoding, NSCopying, NSMutableCopying
|
2000-03-05 17:39:33 +00:00
|
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><a href="NSDictionary.html#method-0">+allocWithZone:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-1">+dictionary</a>
|
|
|
|
<li><a href="NSDictionary.html#method-2">+dictionaryWithContentsOfFile:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-3">+dictionaryWithDictionary:</a>
|
2000-05-08 20:45:47 +00:00
|
|
|
<li><a href="NSDictionary.html#method-4">+dictionaryWithObject:forKey:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-5">+dictionaryWithObjects:forKey:</a>
|
2000-03-05 17:39:33 +00:00
|
|
|
<li><a href="NSDictionary.html#method-6">+dictionaryWithObjects:forKeys:count:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-7">+dictionaryWithObjectsAndKeys:</a>
|
2000-05-08 20:45:47 +00:00
|
|
|
<li><a href="NSDictionary.html#method-30">- keysSortedByValueUsingSelector:</a>
|
2000-03-05 17:39:33 +00:00
|
|
|
<li><a href="NSDictionary.html#method-8">-allKeys</a>
|
|
|
|
<li><a href="NSDictionary.html#method-9">-allKeysForObject:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-10">-allValues</a>
|
|
|
|
<li><a href="NSDictionary.html#method-11">-count</a>
|
|
|
|
<li><a href="NSDictionary.html#method-12">-descriptionInStringsFileFormat</a>
|
|
|
|
<li><a href="NSDictionary.html#method-14">-descriptionWithLocale:</a>
|
2000-05-08 20:45:47 +00:00
|
|
|
<li><a href="NSDictionary.html#method-13">-descriptionWithLocale:</a>
|
2000-03-05 17:39:33 +00:00
|
|
|
<li><a href="NSDictionary.html#method-15">-fileGroupOwnerAccountName</a>
|
|
|
|
<li><a href="NSDictionary.html#method-16">-fileModificationDate</a>
|
|
|
|
<li><a href="NSDictionary.html#method-17">-fileOwnerAccountName</a>
|
|
|
|
<li><a href="NSDictionary.html#method-18">-filePosixPermissions</a>
|
|
|
|
<li><a href="NSDictionary.html#method-19">-fileSize</a>
|
|
|
|
<li><a href="NSDictionary.html#method-20">-fileSystemFileNumber</a>
|
|
|
|
<li><a href="NSDictionary.html#method-21">-fileSystemNumber</a>
|
|
|
|
<li><a href="NSDictionary.html#method-22">-fileType</a>
|
|
|
|
<li><a href="NSDictionary.html#method-23">-initWithContentsOfFile:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-24">-initWithDictionary:</a>
|
2000-05-08 20:45:47 +00:00
|
|
|
<li><a href="NSDictionary.html#method-25">-initWithObjects:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-26">-initWithObjects:forKeys:count:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-27">-initWithObjectsAndKeys:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-28">-isEqualToDictionary:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-29">-keyEnumerator</a>
|
|
|
|
<li><a href="NSDictionary.html#method-31">-objectEnumerator</a>
|
|
|
|
<li><a href="NSDictionary.html#method-32">-objectForKey:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-33">-objectsForKeys:notFoundMarker:</a>
|
|
|
|
<li><a href="NSDictionary.html#method-34">-writeToFile:atomically:</a>
|
2000-03-05 17:39:33 +00:00
|
|
|
</ul>
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-0">allocWithZone:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>allocWithZone:</b> (NSZone*)zone;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-1">dictionary</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionary</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns an empty dictionary.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-2">dictionaryWithContentsOfFile:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionaryWithContentsOfFile:</b> (NSString*)path;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns a dictionary using the file located at path.
|
|
|
|
The file must be a property list containing a dictionary as its root object.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-3">dictionaryWithDictionary:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionaryWithDictionary:</b> (NSDictionary*)otherDictionary;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns a newly created dictionary with the keys and objects of otherDictionary.
|
|
|
|
(The keys and objects are not copied.)
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-4">dictionaryWithObject:forKey:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionaryWithObject:</b> (id)anObject <b>forKey:</b> (id)aKey;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns a dictionary containing only one object (anObject) which is associated with aKey.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-5">dictionaryWithObjects:forKey:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionaryWithObjects:</b> (NSArray*)objects <b>forKey:</b> (NSArray*)keys;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns a dictionary created using the given objects and keys.
|
|
|
|
The two arrays must have the same size.
|
|
|
|
The n th element of the objects array is associated with the n th element of the keys array.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-6">dictionaryWithObjects:forKeys:count:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionaryWithObjects:</b> (id*)objects <b>forKeys:</b> (id*)keys <b>count:</b> (unsigned int)count;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns a dictionary created using the C arrays objects and keys.
|
|
|
|
The number of elements in both C arrays must be count.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-7">dictionaryWithObjectsAndKeys:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
+ (id) <b>dictionaryWithObjectsAndKeys:</b> (id)object, ...;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns a dictionary created using the list given as argument.
|
|
|
|
The list is alernately composed of objects and keys.
|
|
|
|
Thus, the list's length must be pair.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-8">allKeys</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSArray*) <b>allKeys</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns an array containing all the dictionary's keys.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-9">allKeysForObject:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSArray*) <b>allKeysForObject:</b> (id)anObject;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns an array containing all the dictionary's keys that are associated with anObject.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-10">allValues</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSArray*) <b>allValues</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns an array containing all the dictionary's objects.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-11">count</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (unsigned int) <b>count</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns an unsigned integer which is the number of elements stored in the dictionary.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-12">descriptionInStringsFileFormat</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSString*) <b>descriptionInStringsFileFormat</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-13">descriptionWithLocale:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)locale;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-14">descriptionWithLocale:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)locale;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-15">fileGroupOwnerAccountName</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSString*) <b>fileGroupOwnerAccountName</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-16">fileModificationDate</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSDate*) <b>fileModificationDate</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-17">fileOwnerAccountName</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSString*) <b>fileOwnerAccountName</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-18">filePosixPermissions</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (unsigned long) <b>filePosixPermissions</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-19">fileSize</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (unsigned long long) <b>fileSize</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-20">fileSystemFileNumber</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (unsigned long) <b>fileSystemFileNumber</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-21">fileSystemNumber</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (unsigned long) <b>fileSystemNumber</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-22">fileType</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSString*) <b>fileType</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-23">initWithContentsOfFile:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (id) <b>initWithContentsOfFile:</b> (NSString*)path;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
see dictionaryWithContentOfFile:
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<h2><a name="method-24">initWithDictionary:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (id) <b>initWithDictionary:</b> (NSDictionary*)otherDictionary;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
See dictionaryWithDictionary:
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-25">initWithObjects:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (id) <b>initWithObjects:</b> (NSArray*)objects;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
See <a href="#dictionaryWithObjects:">dictionaryWithObjects:</a>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-26">initWithObjects:forKeys:count:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (id) <b>initWithObjects:</b> (id*)objects <b>forKeys:</b> (id*)keys <b>count:</b> (unsigned int)count;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
see dictionaryWithObjects: forKeys: count:
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-27">initWithObjectsAndKeys:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (id) <b>initWithObjectsAndKeys:</b> (id)object,;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
see dictionaryWithObjectsAndKeys:
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-28">isEqualToDictionary:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (BOOL) <b>isEqualToDictionary:</b> (NSDictionary*)otherDictionary;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-29">keyEnumerator</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSEnumerator*) <b>keyEnumerator</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Return an enumerator object containing all the keys of the dictionary.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-30"> keysSortedByValueUsingSelector:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSArray*) <b> keysSortedByValueUsingSelector:</b> (SEL)comparator;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-31">objectEnumerator</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSEnumerator*) <b>objectEnumerator</b>;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Return an enumerator object containing all the keys of the dictionary.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-32">objectForKey:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (id) <b>objectForKey:</b> (id)aKey;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
Returns the first object which has aKey as key.
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-33">objectsForKeys:notFoundMarker:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (NSArray*) <b>objectsForKeys:</b> (NSArray*)keys <b>notFoundMarker:</b> (id)anObject;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
2000-05-08 20:45:47 +00:00
|
|
|
<h2><a name="method-34">writeToFile:atomically:</a></h2>
|
2000-07-04 19:53:39 +00:00
|
|
|
- (BOOL) <b>writeToFile:</b> (NSString*)path <b>atomically:</b> (BOOL)flag;<br>
|
2000-03-05 17:39:33 +00:00
|
|
|
|
2000-05-08 20:45:47 +00:00
|
|
|
|
2000-03-05 17:39:33 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|