home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / FoundationKit / Classes / NSCountedSet.rtf < prev    next >
Encoding:
Text File  |  1994-07-01  |  3.6 KB  |  74 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 NSCountedSet \
  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 NSMutableSet \
  27. \fs16 \
  28. \fs28 \s2 \fs16 \fs28 \f0 \b \fs28 Conforms To:    \b0 \fs28 \f1 NSCopying\
  29. \fi0 NSCoding\
  30. \fi0 NSMutableCopying\
  31. \fi0 NSObject \
  32. \fs16 \
  33. \fs28 \s3 \fi-2771 \fs16 \fs28 \f0 \b \fs28 Declared In:    \b0 \fs28 \f1 foundation/NSSet.h \
  34. \fs16 \
  35. \fs28 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs28 \fs16 \
  36. \
  37. \fs28 Initializing an NSCountedSet\
  38. \fs16 \
  39. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (id)\b initWithArray:\b0 (NSArray *)\i anArray\i0     Initializes a newly allocated set object by placing in it the objects contained in \i anArray.\
  40. \fi-6552 \fi-6552 \i0 \fi-6552 {\f3 -} (id)\b initWithCapacity:\b0 (unsigned int)\i numItems\i0     Initializes a newly allocated set object, giving it enough memory to hold \i numItems\i0  objects.\
  41. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (id)\b initWithSet:\b0 (NSSet *)\i anotherSet\i0     Initializes a newly allocated set object by placing in it the objects contained in \i anotherSet.\
  42. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \i0 \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 (id)\i anObject\i0     Adds \i anObject\i0  to the set, unless \i anObject \i0 is equal to some object already in the set. In either case, the counter that\'27s returned by \b countForObject:\b0  is incremented.\
  48. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  49. \
  50. \
  51. \fs28 Removing Objects\
  52. \fs16 \
  53. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b removeObject:\b0 (id)\i anObject\i0     Decrements the counter for the object, if the set contains an object that\'27s equal to \i anObject\i0 . If this causes the counter to reach zero, the object that\'27s equal to \i anObject\i0  is removed from the set.\
  54. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  55. \
  56. \
  57. \fs28 Querying the NSCountedSet\
  58. \fs16 \
  59. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (unsigned int)\b countForObject:\b0 (id)\i anObject\i0     Returns the number of times that an object equal to \i anObject\i0  has ostensibly been added to the set. (This number is incremented by \b addObject: \b0 and decremented by \b removeObject:\b0 .)\
  60. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSEnumerator *)\b objectEnumerator\b0     Returns an enumerator object that will access each object in the set only once, regardless of its count.\
  61. \fi-6552 \fi-6552 \fi-6552 \
  62. \fi-6552 \pard \s0 \li100 \fi0 \ri1007 \tx478 \tx856 \tx1234 \fs28 \fs16 \
  63. \
  64. \fs28 \
  65. \fs16 \
  66. \
  67. \fs28 \pard \s0 \
  68. \li100 \fi0 \fs16 \
  69. \
  70. \fs28 \
  71. \fs16 \
  72. \
  73. \fs28 }
  74.