libs-base/Documentation/gsdoc/NSDictionary.html

298 lines
10 KiB
HTML
Raw Normal View History

<html><head>
<title>NSDictionary</title>
</head>
<body>
<a href ="NSDeserializer.html">[Previous] </a>
<a href ="Base.html">[Up] </a>
<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>
<dt><a href ="http://altern.org/pyhrr">Pierre-Yves Rivaille</a>
<dd>
</dl>
<p>Version: $Revision$</p>
<p>Date: $Date$</p>
<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>
<p><b>Conforms to: </b> NSCoding, NSCopying, NSMutableCopying
</p>
<hr>
<h2>Instance Variables </h2>
<ul>
</ul>
<h2>Methods </h2>
<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>
<li ><a href ="NSDictionary.html#method-4">+dictionaryWithObject:forKey:</a>
<li ><a href ="NSDictionary.html#method-5">+dictionaryWithObjects:forKey:</a>
<li ><a href ="NSDictionary.html#method-6">+dictionaryWithObjects:forKeys:count:</a>
<li ><a href ="NSDictionary.html#method-7">+dictionaryWithObjectsAndKeys:</a>
<li ><a href ="NSDictionary.html#method-30">- keysSortedByValueUsingSelector:</a>
<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>
<li ><a href ="NSDictionary.html#method-13">-descriptionWithLocale:</a>
<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>
<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>
<li ><a href ="NSDictionary.html#method-35">-writeToURL:atomically:</a>
</ul>
<hr><h2>Class Methods </h2>
<h3><a name ="method-0">allocWithZone:</a></h3>
+ (id) <b>allocWithZone:</b> (NSZone*)zone;<br>
<hr>
<h3><a name ="method-1">dictionary</a></h3>
+ (id) <b>dictionary</b>;<br>
Returns an empty dictionary.
<hr>
<h3><a name ="method-2">dictionaryWithContentsOfFile:</a></h3>
+ (id) <b>dictionaryWithContentsOfFile:</b> (NSString*)path;<br>
Returns a dictionary using the file located at path.
The file must be a property list containing a dictionary as its root object.
<hr>
<h3><a name ="method-3">dictionaryWithDictionary:</a></h3>
+ (id) <b>dictionaryWithDictionary:</b> (NSDictionary*)otherDictionary;<br>
Returns a newly created dictionary with the keys and objects of otherDictionary.
(The keys and objects are not copied.)
<hr>
<h3><a name ="method-4">dictionaryWithObject:forKey:</a></h3>
+ (id) <b>dictionaryWithObject:</b> (id)anObject <b>forKey:</b> (id)aKey;<br>
Returns a dictionary containing only one object (anObject) which is associated with aKey.
<hr>
<h3><a name ="method-5">dictionaryWithObjects:forKey:</a></h3>
+ (id) <b>dictionaryWithObjects:</b> (NSArray*)objects <b>forKey:</b> (NSArray*)keys;<br>
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.
<hr>
<h3><a name ="method-6">dictionaryWithObjects:forKeys:count:</a></h3>
+ (id) <b>dictionaryWithObjects:</b> (id*)objects <b>forKeys:</b> (id*)keys <b>count:</b> (unsigned int)count;<br>
Returns a dictionary created using the C arrays objects and keys.
The number of elements in both C arrays must be count.
<hr>
<h3><a name ="method-7">dictionaryWithObjectsAndKeys:</a></h3>
+ (id) <b>dictionaryWithObjectsAndKeys:</b> (id)object, ...;<br>
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.
<hr>
<hr><h2>Instances Methods </h2>
<h3><a name ="method-8">allKeys</a></h3>
- (NSArray*) <b>allKeys</b>;<br>
Returns an array containing all the dictionary's keys.
<hr>
<h3><a name ="method-9">allKeysForObject:</a></h3>
- (NSArray*) <b>allKeysForObject:</b> (id)anObject;<br>
Returns an array containing all the dictionary's keys that are associated with anObject.
<hr>
<h3><a name ="method-10">allValues</a></h3>
- (NSArray*) <b>allValues</b>;<br>
Returns an array containing all the dictionary's objects.
<hr>
<h3><a name ="method-11">count</a></h3>
- (unsigned int) <b>count</b>;<br>
Returns an unsigned integer which is the number of elements stored in the dictionary.
<hr>
<h3><a name ="method-12">descriptionInStringsFileFormat</a></h3>
- (NSString*) <b>descriptionInStringsFileFormat</b>;<br>
<hr>
<h3><a name ="method-13">descriptionWithLocale:</a></h3>
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)locale;<br>
<hr>
<h3><a name ="method-14">descriptionWithLocale:</a></h3>
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)locale;<br>
<hr>
<h3><a name ="method-15">fileGroupOwnerAccountName</a></h3>
- (NSString*) <b>fileGroupOwnerAccountName</b>;<br>
<hr>
<h3><a name ="method-16">fileModificationDate</a></h3>
- (NSDate*) <b>fileModificationDate</b>;<br>
<hr>
<h3><a name ="method-17">fileOwnerAccountName</a></h3>
- (NSString*) <b>fileOwnerAccountName</b>;<br>
<hr>
<h3><a name ="method-18">filePosixPermissions</a></h3>
- (unsigned long) <b>filePosixPermissions</b>;<br>
<hr>
<h3><a name ="method-19">fileSize</a></h3>
- (unsigned long long) <b>fileSize</b>;<br>
<hr>
<h3><a name ="method-20">fileSystemFileNumber</a></h3>
- (unsigned long) <b>fileSystemFileNumber</b>;<br>
<hr>
<h3><a name ="method-21">fileSystemNumber</a></h3>
- (unsigned long) <b>fileSystemNumber</b>;<br>
<hr>
<h3><a name ="method-22">fileType</a></h3>
- (NSString*) <b>fileType</b>;<br>
<hr>
<h3><a name ="method-23">initWithContentsOfFile:</a></h3>
- (id) <b>initWithContentsOfFile:</b> (NSString*)path;<br>
see dictionaryWithContentOfFile:
<hr>
<h3><a name ="method-24">initWithDictionary:</a></h3>
- (id) <b>initWithDictionary:</b> (NSDictionary*)otherDictionary;<br>
See dictionaryWithDictionary:
<hr>
<h3><a name ="method-25">initWithObjects:</a></h3>
- (id) <b>initWithObjects:</b> (NSArray*)objects;<br>
See <a href ="#dictionaryWithObjects:">dictionaryWithObjects:</a>
<hr>
<h3><a name ="method-26">initWithObjects:forKeys:count:</a></h3>
- (id) <b>initWithObjects:</b> (id*)objects <b>forKeys:</b> (id*)keys <b>count:</b> (unsigned int)count;<br>
see dictionaryWithObjects: forKeys: count:
<hr>
<h3><a name ="method-27">initWithObjectsAndKeys:</a></h3>
- (id) <b>initWithObjectsAndKeys:</b> (id)object,;<br>
see dictionaryWithObjectsAndKeys:
<hr>
<h3><a name ="method-28">isEqualToDictionary:</a></h3>
- (BOOL) <b>isEqualToDictionary:</b> (NSDictionary*)otherDictionary;<br>
<hr>
<h3><a name ="method-29">keyEnumerator</a></h3>
- (NSEnumerator*) <b>keyEnumerator</b>;<br>
Return an enumerator object containing all the keys of the dictionary.
<hr>
<h3><a name ="method-30"> keysSortedByValueUsingSelector:</a></h3>
- (NSArray*) <b> keysSortedByValueUsingSelector:</b> (SEL)comparator;<br>
<hr>
<h3><a name ="method-31">objectEnumerator</a></h3>
- (NSEnumerator*) <b>objectEnumerator</b>;<br>
Return an enumerator object containing all the keys of the dictionary.
<hr>
<h3><a name ="method-32">objectForKey:</a></h3>
- (id) <b>objectForKey:</b> (id)aKey;<br>
Returns the first object which has aKey as key.
<hr>
<h3><a name ="method-33">objectsForKeys:notFoundMarker:</a></h3>
- (NSArray*) <b>objectsForKeys:</b> (NSArray*)keys <b>notFoundMarker:</b> (id)anObject;<br>
<hr>
<h3><a name ="method-34">writeToFile:atomically:</a></h3>
- (BOOL) <b>writeToFile:</b> (NSString*)path <b>atomically:</b> (BOOL)flag;<br>
<hr>
<h3><a name ="method-35">writeToURL:atomically:</a></h3>
- (BOOL) <b>writeToURL:</b> (NSURL*)url <b>atomically:</b> (BOOL)flag;<br>
<hr>
</body>
</html>