libs-base/Documentation/gsdoc/NSDictionary.html
pyr 9b22679264 Added description for basic methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6586 72102866-910b-0410-8b05-ffd578937521
2000-05-08 20:45:47 +00:00

285 lines
9.7 KiB
HTML

<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: 0.2</p>
<p>Date: 25 April, 2000</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>
<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>
</ul>
<hr>
<h2><a name="method-0">allocWithZone:</a></h2>
+ (id) <b>allocWithZone:</b> (NSZone*)zone<br>
<hr>
<h2><a name="method-1">dictionary</a></h2>
+ (id) <b>dictionary</b><br>
Returns an empty dictionary.
<hr>
<h2><a name="method-2">dictionaryWithContentsOfFile:</a></h2>
+ (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>
<h2><a name="method-3">dictionaryWithDictionary:</a></h2>
+ (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>
<h2><a name="method-4">dictionaryWithObject:forKey:</a></h2>
+ (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>
<h2><a name="method-5">dictionaryWithObjects:forKey:</a></h2>
+ (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>
<h2><a name="method-6">dictionaryWithObjects:forKeys:count:</a></h2>
+ (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>
<h2><a name="method-7">dictionaryWithObjectsAndKeys:</a></h2>
+ (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>
<h2><a name="method-8">allKeys</a></h2>
- (NSArray*) <b>allKeys</b><br>
Returns an array containing all the dictionary's keys.
<hr>
<h2><a name="method-9">allKeysForObject:</a></h2>
- (NSArray*) <b>allKeysForObject:</b> (id)anObject<br>
Returns an array containing all the dictionary's keys that are associated with anObject.
<hr>
<h2><a name="method-10">allValues</a></h2>
- (NSArray*) <b>allValues</b><br>
Returns an array containing all the dictionary's objects.
<hr>
<h2><a name="method-11">count</a></h2>
- (unsigned int) <b>count</b><br>
Returns an unsigned integer which is the number of elements stored in the dictionary.
<hr>
<h2><a name="method-12">descriptionInStringsFileFormat</a></h2>
- (NSString*) <b>descriptionInStringsFileFormat</b><br>
<hr>
<h2><a name="method-13">descriptionWithLocale:</a></h2>
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)locale<br>
<hr>
<h2><a name="method-14">descriptionWithLocale:</a></h2>
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)locale<br>
<hr>
<h2><a name="method-15">fileGroupOwnerAccountName</a></h2>
- (NSString*) <b>fileGroupOwnerAccountName</b><br>
<hr>
<h2><a name="method-16">fileModificationDate</a></h2>
- (NSDate*) <b>fileModificationDate</b><br>
<hr>
<h2><a name="method-17">fileOwnerAccountName</a></h2>
- (NSString*) <b>fileOwnerAccountName</b><br>
<hr>
<h2><a name="method-18">filePosixPermissions</a></h2>
- (unsigned long) <b>filePosixPermissions</b><br>
<hr>
<h2><a name="method-19">fileSize</a></h2>
- (unsigned long long) <b>fileSize</b><br>
<hr>
<h2><a name="method-20">fileSystemFileNumber</a></h2>
- (unsigned long) <b>fileSystemFileNumber</b><br>
<hr>
<h2><a name="method-21">fileSystemNumber</a></h2>
- (unsigned long) <b>fileSystemNumber</b><br>
<hr>
<h2><a name="method-22">fileType</a></h2>
- (NSString*) <b>fileType</b><br>
<hr>
<h2><a name="method-23">initWithContentsOfFile:</a></h2>
- (id) <b>initWithContentsOfFile:</b> (NSString*)path<br>
see dictionaryWithContentOfFile:
<hr>
<h2><a name="method-24">initWithDictionary:</a></h2>
- (id) <b>initWithDictionary:</b> (NSDictionary*)otherDictionary<br>
See dictionaryWithDictionary:
<hr>
<h2><a name="method-25">initWithObjects:</a></h2>
- (id) <b>initWithObjects:</b> (NSArray*)objects<br>
See <a href="#dictionaryWithObjects:">dictionaryWithObjects:</a>
<hr>
<h2><a name="method-26">initWithObjects:forKeys:count:</a></h2>
- (id) <b>initWithObjects:</b> (id*)objects <b>forKeys:</b> (id*)keys <b>count:</b> (unsigned int)count<br>
see dictionaryWithObjects: forKeys: count:
<hr>
<h2><a name="method-27">initWithObjectsAndKeys:</a></h2>
- (id) <b>initWithObjectsAndKeys:</b> (id)object,<br>
see dictionaryWithObjectsAndKeys:
<hr>
<h2><a name="method-28">isEqualToDictionary:</a></h2>
- (BOOL) <b>isEqualToDictionary:</b> (NSDictionary*)otherDictionary<br>
<hr>
<h2><a name="method-29">keyEnumerator</a></h2>
- (NSEnumerator*) <b>keyEnumerator</b><br>
Return an enumerator object containing all the keys of the dictionary.
<hr>
<h2><a name="method-30"> keysSortedByValueUsingSelector:</a></h2>
- (NSArray*) <b> keysSortedByValueUsingSelector:</b> (SEL)comparator<br>
<hr>
<h2><a name="method-31">objectEnumerator</a></h2>
- (NSEnumerator*) <b>objectEnumerator</b><br>
Return an enumerator object containing all the keys of the dictionary.
<hr>
<h2><a name="method-32">objectForKey:</a></h2>
- (id) <b>objectForKey:</b> (id)aKey<br>
Returns the first object which has aKey as key.
<hr>
<h2><a name="method-33">objectsForKeys:notFoundMarker:</a></h2>
- (NSArray*) <b>objectsForKeys:</b> (NSArray*)keys <b>notFoundMarker:</b> (id)anObject<br>
<hr>
<h2><a name="method-34">writeToFile:atomically:</a></h2>
- (BOOL) <b>writeToFile:</b> (NSString*)path <b>atomically:</b> (BOOL)flag<br>
<hr>
</body>
</html>