ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/FoundationKit/Classes/NSEnumerator.rtf

This is NSEnumerator.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSEnumerator 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSObject (NSObject)
fs20 
fs28 s7 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSUtilities.h
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 NSEnumerator is a simple abstract class whose instances enumerate collections of other objects. Collection objects'd0such as NSSets, NSArrays, and NSDictionaries'd0provide NSEnumerator objects that can traverse their contents. You send b nextObjectb0  repeatedly to an NSEnumerator to have it return the next object in the collection. When there are no more objects to return, b nextObjectb0  returns b nilb0 .
fs16 
fs28 Collection classes include methods that return an enumerator appropriate to the type of collection. NSArray has two methods that return an NSEnumerator object, b objectEnumeratorb0  and b reverseObjectEnumeratorb0  (the former traverses the array starting at its first object, while the latter starts with the last object and continues backward through the array to the first object). NSSet'27s b objectEnumeratorb0  provides an enumerator for sets. NSDictionary has two enumerator-providing methods: b keyEnumeratorb0  and b objectEnumeratorb0 .
fs16 
fs28 pard s12 li477 fi0 ri1007 ql f0 b fs24 Note:  b0 fs28 f1 Collections shouldn'27t be modified during enumeration. NSEnumerator imposes this restriction to improve enumeration speed.
fs14 
fs28 s16 li100 fi376 fi0 f0 b fs24 
fs28 Traversing a Collection 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (id)b nextObjectb0 tab Returns the next object in the collection being enumerated (for example, an NSArray or NSDictionary). Returns b nilb0  when the collection has been traversed.
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.