FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSDictionary(Functional) Category Reference

See Map/Filter/Reduce for concept of functional tools. More...

#import <NSAFunctional.h>

Instance Methods

(void) - applyProcedureWithKey:
 Apply procedure with key to objects. More...
 
(NSDictionary *) - dictionaryByMappingOperator:
 Maps mapper to objects and returns the result as dictionary. More...
 
(NSDictionary *) - dictionaryByMappingOperatorWithKey:
 Maps mapper with key to objects and returns the result as array. More...
 
(NSDictionary *) - dictionaryByMapFilteringOperator:
 Maps mapper to objects and filters nil result and returns the result as array. More...
 
(NSDictionary *) - dictionaryByMapFilteringOperatorWithKey:
 Maps mapper with index to objects and filters nil result and returns the result as array. More...
 
(NSDictionary *) - dictionaryByFilteringOperator:
 Filters objects and returns result as array. More...
 
(NSDictionary *) - dictionaryByFilteringOperatorWithKey:
 Filters objects with key and returns result as array. More...
 
(id) - firstObjectByFilteringOperator:
 Filters objects and returns the first object of result. More...
 
(id) - firstObjectByFilteringOperatorWithKey:
 Filters objects with key and returns the first object of result. More...
 
(id) - firstKeyByFilteringOperatorWithKey:
 Filters objects with key and returns the first key of result. More...
 

Detailed Description

See Map/Filter/Reduce for concept of functional tools.

Dictionary is not fit for this functional tools. But this implementation takes concept of them.

See also
NSAFunctional.h
NSMutableDictionary(Functional)

Method Documentation

- (void) applyProcedureWithKey: (NSAObjectProcedureWithKey procedure

Apply procedure with key to objects.

Works like NSAApply is adjusted to values of dictionary.

See also
NSAApply
- (NSDictionary *) dictionaryByFilteringOperator: (NSAObjectPicker filter

Filters objects and returns result as array.

Works like NSAFilter

See also
NSAFilter
- (NSDictionary *) dictionaryByFilteringOperatorWithKey: (NSAObjectPickerWithKey filter

Filters objects with key and returns result as array.

Works like NSAFilterWithIndex

See also
NSAFilter
- (NSDictionary *) dictionaryByMapFilteringOperator: (NSAObjectUnaryOperator mapper

Maps mapper to objects and filters nil result and returns the result as array.

Works like NSAMapFilter

See also
NSAMapFilter
- (NSDictionary *) dictionaryByMapFilteringOperatorWithKey: (NSAObjectUnaryOperatorWithKey mapper

Maps mapper with index to objects and filters nil result and returns the result as array.

Works like NSAMapFilterWithIndex

See also
NSAMapFilter
- (NSDictionary *) dictionaryByMappingOperator: (NSAObjectUnaryOperator mapper

Maps mapper to objects and returns the result as dictionary.

Works like NSAMap

See also
NSAMap
- (NSDictionary *) dictionaryByMappingOperatorWithKey: (NSAObjectUnaryOperatorWithKey mapper

Maps mapper with key to objects and returns the result as array.

Works like NSAMapWithIndex

See also
NSAMap
- (id) firstKeyByFilteringOperatorWithKey: (NSAObjectPickerWithKey filter

Filters objects with key and returns the first key of result.

Shallow wrapper of NSAFilterWithIndex

See also
NSAFilter
- (id) firstObjectByFilteringOperator: (NSAObjectPicker filter

Filters objects and returns the first object of result.

Shallow wrapper of NSAFilter

See also
NSAFilter
- (id) firstObjectByFilteringOperatorWithKey: (NSAObjectPickerWithKey filter

Filters objects with key and returns the first object of result.

Shallow wrapper of NSAFilterWithInde

See also
NSAFilter

The documentation for this category was generated from the following file: