Documentation

ETCollectionHOM

ETCollectionHOMMapIntegration

ETCollection optional protocol to support the map and zip operations.

AuthorsGenerated by qmathe
Declared inETCollection+HOM.h

Overview

The ETCollectionHOMMapIntegration protocol defines a hook that collections can use to tie into higher-order messaging if they need special treatment of their elements.


Default

- (void) placeObject: (id)mappedObject inCollection: (id <ETCollectionMutation> *)aTarget insteadOfObject: (id)originalObject atIndex: (NSUInteger)index havingAlreadyMapped: (NSArray *)alreadyMapped info: (id)info

This method will be called by the map- and zip-functions and allows the receiver to control how the replacement object is placed in the target collection (which might be identical to the receiver). Classes adopting the ETCollectionHOMMapIntegration protocol can also implement the -collectionArrayAndInfo: to provide additional information (e.g. about the original state of the collection, which will be passed as mapInfo here.