home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / FoundationKit / Classes / NSMutableArray.rtf < prev    next >
Encoding:
Text File  |  1994-07-01  |  5.6 KB  |  95 lines

  1. {\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;}
  2. {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql   1Head;}
  3. {\s1 \li100 \fi0 \ri1007 \ql   ClassName;}
  4. {\s2 \li2872 \fi-2771 \ri1007 \ql \tx2872   ConformsTo;}
  5. {\s3 \li2872 \fi-2771 \ri1007 \ql   DeclaredIn;}
  6. {\s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030   Description;}
  7. {\s5 \li7030 \fi-5796 \ri1007 \ql   DescriptionPart;}
  8. {\s6 \li0 \fi0 \ri0 \ql \tx-25 \tx8290 \tx9172   Footer;}
  9. {\s7 \li2872 \fi-2771 \ri1007 \ql \tx2872   InheritsFrom;}
  10. {\s8 \li100 \fi0 \ri1007 \ql   Summary;}
  11. }
  12. \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 
  13. (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc.  All Rights Reserved.\
  14. \
  15. \s0 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  16. \
  17. \
  18. \
  19. \
  20. \
  21. \
  22. \fs36 NSMutableArray \
  23. \pard \s7 \li2872 \fi-2771 \ri1007 \ql \tx2872 \f1 \b0 \fs28 \fs16 \
  24. \
  25. \
  26. \fs28 \f0 \b \fs28 Inherits From:    \b0 \fs28 \f1 NSArray : NSObject\
  27. \fs16 \
  28. \fs28 \s2 \fs16 \fs28 \f0 \b \fs28 Conforms To:    \b0 \fs28 \f1 NSCoding\
  29. \fi0 NSCopying  \
  30. \fi0 NSMutableCopying \
  31. \fi0 NSObject\
  32. \fs16 \
  33. \fs28 \s3 \fi-2771 \fs16 \fs28 \f0 \b \fs28 Declared In:    \b0 \fs28 \f1 foundation/NSArray.h \
  34. \fs16 \
  35. \fs28 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs28 \fs16 \
  36. \
  37. \fs28 Allocating and Initializing an NSMutableArray\
  38. \fs16 \
  39. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 + \b allocWithZone:\b0 (NSZone *)\i zone\i0     Creates and returns an uninitialized array object in \i zone.\
  40. \fi-6552 \fi-6552 \i0 \fi-6552 + \b arrayWithCapacity:\b0 (unsigned)\i aNumItems\i0     Creates and returns an array object, giving it enough allocated memory to hold \i numItems\i0  objects.\
  41. \fi-6552 \fi-6552 \fi-6552 {\f3 -} \b initWithCapacity:\b0 (unsigned)\i aNumItems\i0     Initializes a newly allocated array object, giving it enough memory to hold \i numItems\i0  objects.\
  42. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  43. \
  44. \
  45. \fs28 Adding Objects    \
  46. \fs16 \
  47. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b addObject:\b0 \i object\i0     Inserts \i anObject\i0  at the end of the array.\
  48. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b addObjectsFromArray:\b0 (NSArray *)\i anotherArray\
  49. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Adds the objects contained in \i anotherArray\i0  to the end of the receiver\'27s array.\
  50. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (void)\b insertObject:\b0 \i anObject\i0     Inserts \i anObject\i0  into the array at \i index\i0 .\
  51. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b atIndex:\b0 (unsigned)\i index\i0     \
  52. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  53. \
  54. \
  55. \fs28 Removing Objects\
  56. \fs16 \
  57. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b removeAllObjects\b0     Empties the array of all its elements.\
  58. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b removeLastObject\b0     Removes the last object in the array and sends it a \b release\b0  message.\
  59. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b removeObject:\b0 \i anObject\i0     Removes all occurrences of \i anObject\i0 .  \b isEqual:\b0  is used to test for \i anObject\i0 .\
  60. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b removeObjectAtIndex:\b0 (unsigned)\i index\i0     Removes the object at \i index\i0  and moves all elements beyond \i index\i0  up one slot to fill the gap.\
  61. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b removeObjectIdenticalTo:\b0 \i anObject\i0     Removes all elements having the same \b id\b0  as \i anObject\i0 .\
  62. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b removeObjectsFromIndices:\b0 (unsigned *)\i indices\i0     \
  63. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b numIndices:\b0 (unsigned int)\i count\i0     Removes objects at the positions specified in the \i indices\i0  array, which has \i count\i0  elements.  This method is provided for efficiency reasons; it will not work in a distributed object environment.  \
  64. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (void)\b removeObjectsInArray:\b0 (NSArray *)\i otherArray\
  65. \fi-6552 \pard \s5 \li7030 \fi-5796 \ri1007 \ql \tx6652 \tx7030 \i0     Removes from the receiver the objects found in \i otherArray\i0 .\
  66. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  67. \
  68. \
  69. \fs28 Replacing Objects\
  70. \fs16 \
  71. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b replaceObjectAtIndex:\b0 (unsigned)\i index\i0     Replaces the object at \i index\i0  with \i anObject\i0 .  \
  72. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b withObject:\b0 \i anObject\i0     \
  73. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (void)\b setArray:\b0 (NSArray *)\i otherArray\i0     Sets the contents of the receiver to the elements in \i otherArray\
  74. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \i0 \fs16 \
  75. \
  76. \
  77. \fs28 Sorting Elements\
  78. \fs16 \
  79. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b sortUsingFunction:\b0 (int (*)(id \i \fs28 element1\i0 \fs28 ,id \i \fs28 element2\i0 \fs28 ,void *\i \fs28 userData\i0 \fs28 ))\i \fs28 comparator\
  80. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0 \fs28 \b context:\b0 (void *)\i context\i0     Sorts the receiver\'27s elements in ascending order as defined by the comparison function \i comparator\i0 .  \i context\i0  is passed as the function\'27s third argument.\
  81. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (void)\b sortUsingSelector:\b0 (SEL)\i \fs28 comparator\i0 \fs28     Sorts the receiver\'27s elements in ascending order as defined by the comparison method \i comparator\i0 .\
  82. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \
  83. \pard \s0 \li100 \fi0 \ri1007 \tx478 \tx856 \tx1234 \fs28 \fs16 \
  84. \
  85. \fs28 \
  86. \fs16 \
  87. \
  88. \fs28 \pard \s0 \
  89. \li100 \fi0 \fs16 \
  90. \
  91. \fs28 \
  92. \fs16 \
  93. \
  94. \fs28 }
  95.