Declared in NSEnumerator+BMKitAdditions.h

Overview

BMKit related additions to the NSEnumerator class.

Tasks

Sending Messages to Enumerated Objects

Instance Methods

enumerateObjectsUsingBlock:

Executes a given block using each object the receiver has yet to enumerate.

- (void)enumerateObjectsUsingBlock:(void ( ^ ) ( id obj , BOOL *stop ))aBlock

Parameters

aBlock

The block to apply to the objects the receiver has yet to enumerate.

Discussion

Put another way, the block is not executed with objects that have already been enumerated with previous nextObject messages.

Invoking this method exhausts the enumerator’s collection so that subsequent invocations of nextObject return nil.

If the aBlock parameter is nil this method will raise an exceptio

Declared In

NSEnumerator+BMKitAdditions.h

makeObjectsPerformSelector:

Sends to each object the receiver has yet to enumerate the message identified by a given selector.

- (void)makeObjectsPerformSelector:(SEL)aSelector

Parameters

aSelector

A selector that identifies the message to send to the objects the receiver has yet to enumerate. The method must not take any arguments, and must not have the side effect of modifying the enumerator’s collection.

Discussion

Put another way, the message is not send to objects that have already been enumerated with previous nextObject messages.

Invoking this method exhausts the enumerator’s collection so that subsequent invocations of nextObject return nil.

If the aSelector parameter is NULL this method will raise an exceptio

Declared In

NSEnumerator+BMKitAdditions.h

makeObjectsPerformSelector:withObject:

Sends to each object the receiver has yet to enumerate the message identified by a given selector.

- (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(id)anObject

Parameters

aSelector

A selector that identifies the message to send to the objects the receiver has yet to enumerate. The method must take a single argument of type id, and must not have the side effect of modifying the enumerator’s collection.

anObject

The object to send as the argument to each invocation of the aSelector method.

Discussion

Put another way, the message is not send to objects that have already been enumerated with previous nextObject messages.

Invoking this method exhausts the enumerator’s collection so that subsequent invocations of nextObject return nil.

If the aSelector parameter is NULL this method will raise an exceptio

Declared In

NSEnumerator+BMKitAdditions.h