/usr/share/GNUstep/Documentation/Developer/Base/Reference/NSDictionary.html is in gnustep-base-doc 1.24.7-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>NSDictionary class reference</title>
</head>
<body>
<font face="serif">
<a href="Base.html">Up</a>
<br />
<h1><a name="title$NSDictionary">NSDictionary class reference</a></h1>
<h3>Authors</h3>
<dl>
<dt>Andrew Kachites McCallum (<a href="mailto:mccallum@gnu.ai.mit.edu"><code>mccallum@gnu.ai.mit.edu</code></a>)</dt>
<dd>
</dd>
<dt>Adam Fedor (<a href="mailto:fedor@boulder.colorado.edu"><code>fedor@boulder.colorado.edu</code></a>)</dt>
<dd>
</dd>
</dl>
<p><b>Version:</b> 37431</p>
<p><b>Date:</b> 2013-12-05 13:16:36 +0000 (Thu, 05 Dec 2013)</p>
<p><b>Copyright:</b> (C) 1995, 1996, 1997 Free Software Foundation, Inc.</p>
<div>
<hr width="50%" align="left" />
<h3>Contents -</h3>
<ol>
<li>
<a href="#001000000000">Software documentation for the NSDictionary class</a>
</li>
<li>
<a href="#002000000000">Software documentation for the NSMutableDictionary
class</a>
</li>
</ol>
<hr width="50%" align="left" />
</div>
<h1><a name="001000000000">
Software documentation for the NSDictionary class
</a></h1>
<h2><a name="class$NSDictionary">NSDictionary</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>Foundation/NSDictionary.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd><a rel="gsdoc" href="NSObject.html#protocol$(NSCoding)">NSCoding</a></dd>
<dd><a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)">NSCopying</a></dd>
<dd><a rel="gsdoc" href="NSObject.html#protocol$(NSMutableCopying)">NSMutableCopying</a></dd>
<dd><a rel="gsdoc" href="NSEnumerator.html#protocol$(NSFastEnumeration)">NSFastEnumeration</a></dd>
</dl>
</blockquote>
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
This class and its subclasses store key-value pairs,
where the key and the value are objects. A great many
utility methods for working with dictionaries are
provided as part of this class, including the
ability to retrieve multiple entries
simultaneously, obtain sorted contents, and
read/write from/to a serialized representation.
</p>
<p>
</p>
<p>
The keys are copied and values are retained by the
implementation, and both are released when
either their entry is dropped or the entire
dictionary is deallocated. <br /> As in the OS X
implementation, keys must therefore
implement the
<a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)"><NSCopying></a>
protocol. </p>
<p>
</p>
<p>
Objects of this class are immutable. For a
mutable version, use the
<a rel="gsdoc" href="#class$NSMutableDictionary">NSMutableDictionary</a>
subclass. </p>
<p>
</p>
<p>
The basic functionality in
<code>NSDictionary</code> is similar to that in
Java's <code>HashMap</code>, and like that class
it includes no locking code and is not thread-safe.
If the contents will be modified and accessed from
multiple threads you should enclose critical
operations within locks (see
<a rel="gsdoc" href="NSLock.html#class$NSLock">NSLock</a>
).
</p>
<p>
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileCreationDate">-fileCreationDate</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileExtensionHidden">-fileExtensionHidden</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileGroupOwnerAccountID">-fileGroupOwnerAccountID</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileGroupOwnerAccountName">-fileGroupOwnerAccountName</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileHFSCreatorCode">-fileHFSCreatorCode</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileHFSTypeCode">-fileHFSTypeCode</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileIsAppendOnly">-fileIsAppendOnly</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileIsImmutable">-fileIsImmutable</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileModificationDate">-fileModificationDate</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileOwnerAccountID">-fileOwnerAccountID</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileOwnerAccountName">-fileOwnerAccountName</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-filePosixPermissions">-filePosixPermissions</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileSize">-fileSize</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileSystemFileNumber">-fileSystemFileNumber</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileSystemNumber">-fileSystemNumber</a></li>
<li><a rel="gsdoc" href="NSFileManager.html#method$NSDictionary(NSFileAttributes)-fileType">-fileType</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionary">+dictionary</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithContentsOfFile$">+dictionaryWithContentsOfFile:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithContentsOfURL$">+dictionaryWithContentsOfURL:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithDictionary$">+dictionaryWithDictionary:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithObject$forKey$">+dictionaryWithObject:forKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithObjects$forKeys$">+dictionaryWithObjects:forKeys:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithObjects$forKeys$count$">+dictionaryWithObjects:forKeys:count:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary+dictionaryWithObjectsAndKeys$,...">+dictionaryWithObjectsAndKeys:,...</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-allKeys">-allKeys</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-allKeysForObject$">-allKeysForObject:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-allValues">-allValues</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-count">-count</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-description">-description</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-descriptionInStringsFileFormat">-descriptionInStringsFileFormat</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-descriptionWithLocale$">-descriptionWithLocale:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-descriptionWithLocale$indent$">-descriptionWithLocale:indent:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-enumerateKeysAndObjectsUsingBlock$">-enumerateKeysAndObjectsUsingBlock:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-enumerateKeysAndObjectsWithOptions$usingBlock$">-enumerateKeysAndObjectsWithOptions:usingBlock:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-getObjects$andKeys$">-getObjects:andKeys:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-init">-init</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithContentsOfFile$">-initWithContentsOfFile:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithContentsOfURL$">-initWithContentsOfURL:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithDictionary$">-initWithDictionary:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithDictionary$copyItems$">-initWithDictionary:copyItems:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithObjects$forKeys$">-initWithObjects:forKeys:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithObjects$forKeys$count$">-initWithObjects:forKeys:count:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-initWithObjectsAndKeys$,...">-initWithObjectsAndKeys:,...</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-isEqualToDictionary$">-isEqualToDictionary:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-keyEnumerator">-keyEnumerator</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-keysOfEntriesPassingTest$">-keysOfEntriesPassingTest:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-keysOfEntriesWithOptions$passingTest$">-keysOfEntriesWithOptions:passingTest:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-keysSortedByValueUsingSelector$">-keysSortedByValueUsingSelector:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-objectEnumerator">-objectEnumerator</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-objectForKey$">-objectForKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-objectForKeyedSubscript$">-objectForKeyedSubscript:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-objectsForKeys$notFoundMarker$">-objectsForKeys:notFoundMarker:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-valueForKey$">-valueForKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-writeToFile$atomically$">-writeToFile:atomically:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSDictionary-writeToURL$atomically$">-writeToURL:atomically:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$NSDictionary+dictionary">dictionary </a></h3>
+ (id) <b>dictionary</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a new autoreleased empty dictionary.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithContentsOfFile$">dictionaryWithContentsOfFile: </a></h3>
+ (id) <b>dictionaryWithContentsOfFile:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)path;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a dictionary using the file located at
<var>path</var>. The file must be a property list
containing a dictionary as its root object.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithContentsOfURL$">dictionaryWithContentsOfURL: </a></h3>
+ (id) <b>dictionaryWithContentsOfURL:</b> (<a rel="gsdoc" href="NSURL.html#class$NSURL">NSURL</a>*)aURL;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
Returns a dictionary using the contents of
<var>aURL</var>. The URL must be a property list
containing a dictionary as its root object.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithDictionary$">dictionaryWithDictionary: </a></h3>
+ (id) <b>dictionaryWithDictionary:</b> (<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>*)otherDictionary;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a newly created dictionary with the keys
and objects of <var>otherDictionary</var>. (The keys
and objects are not copied.)
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithObject$forKey$">dictionaryWithObject: forKey: </a></h3>
+ (id) <b>dictionaryWithObject:</b> (id)object<b> forKey:</b> (id)key;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a dictionary containing only one
<var>object</var> which is associated with a
<var>key</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithObjects$forKeys$">dictionaryWithObjects: forKeys: </a></h3>
+ (id) <b>dictionaryWithObjects:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)objects<b> forKeys:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)keys;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a dictionary created using the given
<var>objects</var> and <var>keys</var>. The two
arrays must have the same length. The n th element
of the <var>objects</var> array is associated with the n
th element of the <var>keys</var> array.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithObjects$forKeys$count$">dictionaryWithObjects: forKeys: count: </a></h3>
+ (id) <b>dictionaryWithObjects:</b> (const id[])objects<b> forKeys:</b> (const id<<a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)">NSCopying</a>>[])keys<b> count:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)count;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a dictionary created using the given
<var>objects</var> and <var>keys</var>. The two
arrays must have the same size. The n th element of
the <var>objects</var> array is associated with the n
th element of the <var>keys</var> array.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary+dictionaryWithObjectsAndKeys$,...">dictionaryWithObjectsAndKeys: ,...</a></h3>
+ (id) <b>dictionaryWithObjectsAndKeys:</b> (id)firstObject<b>,...</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a dictionary created using the list given
as argument. The list is alternately composed of objects
and keys and terminated by <code>nil</code>. Thus, the
list's length must be even, followed by
<code>nil</code>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-allKeys">allKeys </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>allKeys</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array containing all the dictionary's
keys.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-allKeysForObject$">allKeysForObject: </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>allKeysForObject:</b> (id)anObject;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array containing all the dictionary's
keys that are associated with <var>anObject</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-allValues">allValues </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>allValues</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array containing all the dictionary's
objects.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-count">count </a></h3>
- (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>) <b>count</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an <strong>unsigned</strong> integer which
is the number of elements stored in the dictionary.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-description">description </a></h3>
- (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>description</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the result of invoking
<a rel="gsdoc" href="#method$NSDictionary-descriptionWithLocale$indent$">
-descriptionWithLocale:indent:
</a>
with a <code>nil</code> locale and zero indent.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-descriptionInStringsFileFormat">descriptionInStringsFileFormat </a></h3>
- (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>descriptionInStringsFileFormat</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the receiver as a text property list
strings file format. <br /> See
<a rel="gsdoc" href="NSString.html#method$NSString-propertyListFromStringsFileFormat">[NSString -propertyListFromStringsFileFormat]</a>
for details. <br /> The order of the items is undefined.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-descriptionWithLocale$">descriptionWithLocale: </a></h3>
- (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>descriptionWithLocale:</b> (id)locale;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the result of invoking
<a rel="gsdoc" href="#method$NSDictionary-descriptionWithLocale$indent$">
-descriptionWithLocale:indent:
</a>
with a zero indent.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-descriptionWithLocale$indent$">descriptionWithLocale: indent: </a></h3>
- (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>descriptionWithLocale:</b> (id)locale<b> indent:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)level;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the receiver as a text property list in the
traditional format. <br /> See
<a rel="gsdoc" href="NSString.html#method$NSString-propertyList">
[NSString -propertyList]
</a>
for details. <br /> If <var>locale</var> is
<code>nil</code>, no formatting is done, otherwise
entries are formatted according to the
<var>locale</var>, and indented according to
<var>level</var>. <br /> Unless <var>locale</var> is
<code>nil</code>, a <var>level</var> of zero indents
items by four spaces, while a <var>level</var> of one
indents them by a tab. <br /> If the keys in the
dictionary respond to
[NSObject -compare:]
, the items are listed by key in ascending order. If not,
the order in which the items are listed is undefined.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-enumerateKeysAndObjectsUsingBlock$">enumerateKeysAndObjectsUsingBlock: </a></h3>
- (void) <b>enumerateKeysAndObjectsUsingBlock:</b> (GSKeysAndObjectsEnumeratorBlock)aBlock;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.6.0</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-enumerateKeysAndObjectsWithOptions$usingBlock$">enumerateKeysAndObjectsWithOptions: usingBlock: </a></h3>
- (void) <b>enumerateKeysAndObjectsWithOptions:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSEnumerationOptions">NSEnumerationOptions</a>)opts<b> usingBlock:</b> (GSKeysAndObjectsEnumeratorBlock)aBlock;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.6.0</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-getObjects$andKeys$">getObjects: andKeys: </a></h3>
- (void) <b>getObjects:</b> (__unsafe_unretained id[])objects<b> andKeys:</b> (__unsafe_unretained id[])keys;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-init">init </a></h3>
- (id) <b>init</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
In MacOS-X class clusters do not have designated
initialisers, and there is a general rule
that <a rel="gsdoc" href="#method$NSDictionary-init">-init</a>
is
treated as the designated initialiser of the
class cluster, but that other intitialisers may not
work s expected an would need to be individually
overridden in any subclass.
</p>
<p>
</p>
<p>
GNUstep tries to make it easier to subclass a
class cluster, by making class clusters follow the
same convention as normal classes, so the designated
initialiser is the <em>richest</em>
initialiser. This means that all other
initialisers call the documented designated
initialiser (which calls
<a rel="gsdoc" href="#method$NSDictionary-init">
-init
</a>
only for MacOS-X compatibility), and anyone writing
a subclass only needs to override that one initialiser
in order to have all the other ones work.
</p>
<p>
</p>
<p>
For MacOS-X compatibility, you may also need to
override various other initialisers. Exactly
which ones, you will need to determine by trial on
a MacOS-X system... and may vary between releases of
MacOS-X. So to be safe, on MacOS-X you probably
need to re-implement <em>all</em> the class cluster
initialisers you might use in conjunction
with your subclass.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithContentsOfFile$">initWithContentsOfFile: </a></h3>
- (id) <b>initWithContentsOfFile:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)path;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
Initialises the dictionary with the contents
of the specified file, which must contain a dictionary
in property-list format.
</p>
<p>
</p>
<p>
In GNUstep, the property-list format may be either the
OpenStep format (ASCII data), or the MacOS-X
format (UTF-8 XML data)... this method will
recognise which it is.
</p>
<p>
</p>
<p>
If there is a failure to load the file for any reason,
the receiver will be released and the method will
return <code>nil</code>.
</p>
<p>
</p>
<p>
Works by invoking
<a rel="gsdoc" href="NSString.html#method$NSString-initWithContentsOfFile$">[NSString -initWithContentsOfFile:]</a>
and <a rel="gsdoc" href="NSString.html#method$NSString-propertyList">[NSString -propertyList]</a>
then checking that the result is a dictionary.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithContentsOfURL$">initWithContentsOfURL: </a></h3>
- (id) <b>initWithContentsOfURL:</b> (<a rel="gsdoc" href="NSURL.html#class$NSURL">NSURL</a>*)aURL;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
</p>
<p>
Initialises the dictionary with the contents
of the specified URL, which must contain a dictionary
in property-list format.
</p>
<p>
</p>
<p>
In GNUstep, the property-list format may be either the
OpenStep format (ASCII data), or the MacOS-X
format (UTF-8 XML data)... this method will
recognise which it is.
</p>
<p>
</p>
<p>
If there is a failure to load the URL for any reason,
the receiver will be released and the method will
return <code>nil</code>.
</p>
<p>
</p>
<p>
Works by invoking
<a rel="gsdoc" href="NSString.html#method$NSString-initWithContentsOfURL$">[NSString -initWithContentsOfURL:]</a>
and <a rel="gsdoc" href="NSString.html#method$NSString-propertyList">[NSString -propertyList]</a>
then checking that the result is a dictionary.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithDictionary$">initWithDictionary: </a></h3>
- (id) <b>initWithDictionary:</b> (<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>*)otherDictionary;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Initializes with the keys and objects of
<var>otherDictionary</var>. (The keys and objects are
not copied.)
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithDictionary$copyItems$">initWithDictionary: copyItems: </a></h3>
- (id) <b>initWithDictionary:</b> (<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>*)other<b> copyItems:</b> (BOOL)shouldCopy;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Initialise dictionary with the keys and values
of otherDictionary. If the <var>shouldCopy</var> flag is
<code>YES</code> then the values are copied into the
newly initialised dictionary, otherwise they are
simply retained, on the assumption that it is safe
to retain the keys from another dictionary since that
<var>other</var> dictionary mwill have copied the
keys originally to ensure that they are immutable.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithObjects$forKeys$">initWithObjects: forKeys: </a></h3>
- (id) <b>initWithObjects:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)objects<b> forKeys:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)keys;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Initialises a dictionary created using the
given <var>objects</var> and <var>keys</var>. The two
arrays must have the same size. The n th element of
the <var>objects</var> array is associated with the n
th element of the <var>keys</var> array.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithObjects$forKeys$count$">initWithObjects: forKeys: count: </a></h3>
- (id) <b>initWithObjects:</b> (const id[])objects<b> forKeys:</b> (const id<<a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)">NSCopying</a>>[])keys<b> count:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)count;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
This is a designated initialiser for the class.<br />
Subclasses <strong>must</strong> override this method.<br />
<div class="desc">
Initializes contents to the given
<var>objects</var> and <var>keys</var>. The two
arrays must have the same size. The n th element of
the <var>objects</var> array is associated with the n
th element of the <var>keys</var> array. <br /> Calls
<a rel="gsdoc" href="#method$NSDictionary-init">
-init
</a>
(which does nothing but maintain MacOS-X
compatibility), and needs to be
re-implemented in subclasses in order to
have all other initialisers work.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-initWithObjectsAndKeys$,...">initWithObjectsAndKeys: ,...</a></h3>
- (id) <b>initWithObjectsAndKeys:</b> (id)firstObject<b>,...</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Initialises a dictionary created using the list
given as argument. The list is alternately composed
of objects and keys and terminated by <code>nil</code>.
Thus, the list's length must be even, followed by
<code>nil</code>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-isEqualToDictionary$">isEqualToDictionary: </a></h3>
- (BOOL) <b>isEqualToDictionary:</b> (<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>*)other;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Two dictionaries are equal if they each hold the same
number of entries, each key in one
<code>isEqual</code> to a key in the
<var>other</var>, and, for a given key, the
corresponding value objects also satisfy
<code>isEqual</code>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-keyEnumerator">keyEnumerator </a></h3>
- (<a rel="gsdoc" href="NSEnumerator.html#class$NSEnumerator">NSEnumerator</a>*) <b>keyEnumerator</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Return an enumerator object containing all the keys
of the dictionary.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-keysOfEntriesPassingTest$">keysOfEntriesPassingTest: </a></h3>
- (<a rel="gsdoc" href="NSSet.html#class$NSSet">NSSet</a>*) <b>keysOfEntriesPassingTest:</b> (GSKeysAndObjectsPredicateBlock)aPredicate;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.6.0</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-keysOfEntriesWithOptions$passingTest$">keysOfEntriesWithOptions: passingTest: </a></h3>
- (<a rel="gsdoc" href="NSSet.html#class$NSSet">NSSet</a>*) <b>keysOfEntriesWithOptions:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSEnumerationOptions">NSEnumerationOptions</a>)opts<b> passingTest:</b> (GSKeysAndObjectsPredicateBlock)aPredicate;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.6.0</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-keysSortedByValueUsingSelector$">keysSortedByValueUsingSelector: </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>keysSortedByValueUsingSelector:</b> (SEL)comp;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns ordered array of the keys sorted according
to the values they correspond to. To sort the values, a
message with selector <var>comp</var> is send to
each value with another value as argument, as in
<code>[a comp: b]</code>. The <var>comp</var> method
should return <code>NSOrderedSame</code>,
<code>NSOrderedAscending</code>, or
<code>NSOrderedDescending</code> as appropriate.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-objectEnumerator">objectEnumerator </a></h3>
- (<a rel="gsdoc" href="NSEnumerator.html#class$NSEnumerator">NSEnumerator</a>*) <b>objectEnumerator</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Return an enumerator object containing all the
objects of the dictionary.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-objectForKey$">objectForKey: </a></h3>
- (id) <b>objectForKey:</b> (id)aKey;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the object in the dictionary corresponding
to <var>aKey</var>, or <code>nil</code> if the key is
not present.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-objectForKeyedSubscript$">objectForKeyedSubscript: </a></h3>
- (id) <b>objectForKeyedSubscript:</b> (id)aKey;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Method called by array subscripting.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-objectsForKeys$notFoundMarker$">objectsForKeys: notFoundMarker: </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>objectsForKeys:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)keys<b> notFoundMarker:</b> (id)marker;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Multiple version of
<a rel="gsdoc" href="#method$NSDictionary-objectForKey$">
-objectForKey:
</a>
. Objects for each key in <var>keys</var> are looked up
and placed into return array in same order. For each
key that has no corresponding value in this dictionary,
<var>marker</var> is put into the array in its place.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-valueForKey$">valueForKey: </a></h3>
- (id) <b>valueForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
Default implementation for this class is to return
the value stored in the dictionary under the specified
<var>key</var>, or <code>nil</code> if there is no
value. <br /> However, if the <var>key</var> begins
with '@' that character is stripped from it and the
superclass implementation of the method is used.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-writeToFile$atomically$">writeToFile: atomically: </a></h3>
- (BOOL) <b>writeToFile:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)path<b> atomically:</b> (BOOL)useAuxiliaryFile;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
Writes the contents of the dictionary to the file
specified by <var>path</var>. The file contents
will be in property-list format... under GNUstep
this is either OpenStep style (ASCII characters
using \U hexadecimal escape sequences for unicode),
or MacOS-X style (XML in the UTF8 character set).
</p>
<p>
</p>
<p>
If the <var>useAuxiliaryFile</var> flag is
<code>YES</code>, the file write operation is
atomic... the data is written to a temporary file,
which is then renamed to the actual file name.
</p>
<p>
</p>
<p>
If the conversion of data into the correct
property-list format fails or the write
operation fails, the method returns
<code>NO</code>, otherwise it returns
<code>YES</code>.
</p>
<p>
</p>
<p>
NB. The fact that the file is in property-list format
does not necessarily mean that it can be used to
reconstruct the dictionary using the
<a rel="gsdoc" href="#method$NSDictionary-initWithContentsOfFile$">
-initWithContentsOfFile:
</a>
method. If the original dictionary contains
non-property-list objects, the
descriptions of those objects will have been
written, and reading in the file as a
property-list will result in a new
dictionary containing the string descriptions.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSDictionary-writeToURL$atomically$">writeToURL: atomically: </a></h3>
- (BOOL) <b>writeToURL:</b> (<a rel="gsdoc" href="NSURL.html#class$NSURL">NSURL</a>*)url<b> atomically:</b> (BOOL)useAuxiliaryFile;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
</p>
<p>
Writes the contents of the dictionary to the
specified <var>url</var>. This functions just
like
<a rel="gsdoc" href="#method$NSDictionary-writeToFile$atomically$">
-writeToFile:atomically:
</a>
except that the output may be written to any URL,
not just a local file.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<h1><a name="002000000000">
Software documentation for the NSMutableDictionary
class
</a></h1>
<h2><a name="class$NSMutableDictionary">NSMutableDictionary</a> : <a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a></h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>Foundation/NSDictionary.h</dd>
</dl>
</blockquote>
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Mutable version of
<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>
.
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary+dictionaryWithCapacity$">+dictionaryWithCapacity:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-addEntriesFromDictionary$">-addEntriesFromDictionary:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-initWithCapacity$">-initWithCapacity:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-removeAllObjects">-removeAllObjects</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-removeObjectForKey$">-removeObjectForKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-removeObjectsForKeys$">-removeObjectsForKeys:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-setDictionary$">-setDictionary:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-setObject$forKey$">-setObject:forKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-setObject$forKeyedSubscript$">-setObject:forKeyedSubscript:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-setValue$forKey$">-setValue:forKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-takeStoredValue$forKey$">-takeStoredValue:forKey:</a></li>
<li><a rel="gsdoc" href="NSDictionary.html#method$NSMutableDictionary-takeValue$forKey$">-takeValue:forKey:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$NSMutableDictionary+dictionaryWithCapacity$">dictionaryWithCapacity: </a></h3>
+ (id) <b>dictionaryWithCapacity:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)numItems;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an empty dictionary with memory
preallocated for given number of entries.
Although memory space will be grown as needed when
entries are added, this can avoid the
reallocate-and-copy process if the size
of the ultimate contents is known in advance.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-addEntriesFromDictionary$">addEntriesFromDictionary: </a></h3>
- (void) <b>addEntriesFromDictionary:</b> (<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>*)otherDictionary;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Merges information from <var>otherDictionary</var>
into the receiver. If a key exists in both
dictionaries, the value from
<var>otherDictionary</var> replaces that which was
originally in the receiver.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-initWithCapacity$">initWithCapacity: </a></h3>
- (id) <b>initWithCapacity:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)numItems;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
This is a designated initialiser for the class.<br />
Subclasses <strong>must</strong> override this method.<br />
<div class="desc">
Initializes an empty dictionary with memory
preallocated for given number of entries.
Although memory space will be grown as needed when
entries are added, this can avoid the
reallocate-and-copy process if the size
of the ultimate contents is known in advance. <br />
Calls <a rel="gsdoc" href="#method$NSDictionary-init">-init</a>
(which does nothing but maintain MacOS-X
compatibility), and needs to be
re-implemented in subclasses in order to
have all other initialisers work.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-removeAllObjects">removeAllObjects </a></h3>
- (void) <b>removeAllObjects</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Clears out this dictionary by removing all entries.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-removeObjectForKey$">removeObjectForKey: </a></h3>
- (void) <b>removeObjectForKey:</b> (id)aKey;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Remove key-value mapping for given key
<var>aKey</var>. No error if there is no mapping for
the key. A warning will be generated if <var>aKey</var>
is <code>nil</code>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-removeObjectsForKeys$">removeObjectsForKeys: </a></h3>
- (void) <b>removeObjectsForKeys:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)keyArray;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Remove entries specified by the given
<var>keyArray</var>. No error is generated if no
mapping exists for a key or one is <code>nil</code>
, although a console warning is produced in the latter
case.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-setDictionary$">setDictionary: </a></h3>
- (void) <b>setDictionary:</b> (<a rel="gsdoc" href="#class$NSDictionary">NSDictionary</a>*)otherDictionary;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Remove all entries, then add all entries from
<var>otherDictionary</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-setObject$forKey$">setObject: forKey: </a></h3>
- (void) <b>setObject:</b> (id)anObject<b> forKey:</b> (id)aKey;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Adds entry for <var>aKey</var>, mapping to
<var>anObject</var>. If either is <code>nil</code>,
an exception is raised. If <var>aKey</var> already in
dictionary, the value it maps to is silently
replaced. The value <var>anObject</var> is
retained, but <var>aKey</var> is copied (because
a dictionary key must be immutable) and must therefore
implement the
<a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)"><NSCopying></a>
protocol.)
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-setObject$forKeyedSubscript$">setObject: forKeyedSubscript: </a></h3>
- (void) <b>setObject:</b> (id)anObject<b> forKeyedSubscript:</b> (id)aKey;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Method called by array subscripting.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-setValue$forKey$">setValue: forKey: </a></h3>
- (void) <b>setValue:</b> (id)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
Default implementation for this class is equivalent
to the
<a rel="gsdoc" href="#method$NSMutableDictionary-setObject$forKey$">
-setObject:forKey:
</a>
method unless <var>value</var> is <code>nil</code>,
in which case it is equivalent to
<a rel="gsdoc" href="#method$NSMutableDictionary-removeObjectForKey$">
-removeObjectForKey:
</a>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-takeStoredValue$forKey$">takeStoredValue: forKey: </a></h3>
- (void) <b>takeStoredValue:</b> (id)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
Default implementation for this class is equivalent
to the
<a rel="gsdoc" href="#method$NSMutableDictionary-setObject$forKey$">
-setObject:forKey:
</a>
method unless <var>value</var> is <code>nil</code>,
in which case it is equivalent to
<a rel="gsdoc" href="#method$NSMutableDictionary-removeObjectForKey$">
-removeObjectForKey:
</a>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSMutableDictionary-takeValue$forKey$">takeValue: forKey: </a></h3>
- (void) <b>takeValue:</b> (id)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
<div class="desc">
Default implementation for this class is equivalent
to the
<a rel="gsdoc" href="#method$NSMutableDictionary-setObject$forKey$">
-setObject:forKey:
</a>
method unless <var>value</var> is <code>nil</code>,
in which case it is equivalent to
<a rel="gsdoc" href="#method$NSMutableDictionary-removeObjectForKey$">
-removeObjectForKey:
</a>
</div>
<hr width="25%" align="left" />
</div>
<br />
<a href="Base.html">Up</a>
</font>
</body>
</html>
|