Declared in NSMutableDictionary+BlocksKit.h

Overview

Block extensions for NSMutableDictionary.

These utilities expound upon the BlocksKit additions to the immutable superclass by allowing certain utilities to work on an instance of the mutable class, saving memory by not creating an immutable copy of the results.

Includes code by the following:

Tasks

  • – bk_performSelect:

    Filters a mutable dictionary to the key/value pairs matching the block.

  • – bk_performReject:

    Filters a mutable dictionary to the key/value pairs not matching the block, the logical inverse to bk_select:.

  • – bk_performMap:

    Transform each value of the dictionary to a new value, as returned by the block.

Instance Methods

bk_performMap:

- (void)bk_performMap:(id ( ^ ) ( id key , id obj ))block
Discussion

Transform each value of the dictionary to a new value, as returned by the block.

Parameters

block

A block that returns a new value for a given key/value pair.

See Also

Declared In

NSMutableDictionary+BlocksKit.h

bk_performReject:

- (void)bk_performReject:(BOOL ( ^ ) ( id key , id obj ))block
Discussion

Filters a mutable dictionary to the key/value pairs not matching the block, the logical inverse to bk_select:.

Parameters

block

A BOOL-returning code block for a key/value pair.

See Also

Declared In

NSMutableDictionary+BlocksKit.h

bk_performSelect:

- (void)bk_performSelect:(BOOL ( ^ ) ( id key , id obj ))block
Discussion

Filters a mutable dictionary to the key/value pairs matching the block.

Parameters

block

A BOOL-returning code block for a key/value pair.

See Also

Declared In

NSMutableDictionary+BlocksKit.h