Up

NSEnumerator class reference

Authors

Andrew Kachites McCallum (mccallum@gnu.ai.mit.edu)

Version: 29669

Date: 2010-02-19 08:12:46 +0000 (Fri, 19 Feb 2010)

Copyright: (C) 1995, 1996 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSEnumerator class
  2. Software documentation for the NSFastEnumeration protocol

Software documentation for the NSEnumerator class

NSEnumerator : NSObject

Declared in:
Foundation/NSEnumerator.h
Conforms to:
NSFastEnumeration
Availability: OpenStep

Simple class for iterating over a collection of objects, usually returned from an NSArray or similar.
Method summary

allObjects 

- (NSArray*) allObjects;
Availability: OpenStep

Returns all objects remaining in the enumeration as an array.
Calling this method 'exhausts' the enumerator, leaving it at the end of the collection being enumerated.

nextObject 

- (id) nextObject;
Availability: OpenStep

Returns next object in enumeration, or nil if none remain. Use code like while (object = [enumerator nextObject]) {...} .

Software documentation for the NSFastEnumeration protocol

NSFastEnumeration

Declared in:
Foundation/NSEnumerator.h
Availability: OpenStep

Description forthcoming.
Method summary

countByEnumeratingWithState: objects: count: 

- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState*)state objects: (__unsafe_unretained id[])stackbuf count: (NSUInteger)len;
Availability: OpenStep

Description forthcoming.


Up