NSArray categories documentation
All the public Categories which extend NSArray class.
ETKeyValuePairRepresentation
NSArray (ETKeyValuePairRepresentation)ETKeyValuePair-related extensions to NSArray.
| Authors | Generated by qmathe |
|---|---|
| Declared in | ETKeyValuePair.h |
Default
- - (NSDictionary *) dictionaryRepresentation
Returns a dictionary where every ETKeyValuePair present in the array is turned into a key/value entry.
For every other object, its index in the array becomes its key in the dictionary.
The returned dictionary is autoreleased.
Raises an NSGenericException when the receiver contains an object which is not an ETKeyValuePair object.
ETCollection
NSArray (ETCollection) <ETCollection>ETCollection support for NSArray.
| Authors | Generated by qmathe |
|---|---|
| Declared in | ETCollection.h |
Default
- + (Class) mutableClass
Returns NSMutableDictionary class.
- - (BOOL) isOrdered
- Description forthcoming.
- - (id) content
- Description forthcoming.
- - (NSArray *) contentArray
- Description forthcoming.
- - (NSArray *) viewpointArray
- Description forthcoming.
ETCollectionHOM
NSArray (ETCollectionHOM) <ETCollectionHOM>Higher-order messaging support for NSArray.
| Authors | Generated by qmathe |
|---|---|
| Declared in | ETCollection+HOM.h |
Etoile
NSArray (Etoile)Additions to NSArray.
| Authors | Generated by qmathe |
|---|---|
| Declared in | NSArray+Etoile.h |
Default
- - (id) firstObject
Returns the first object in the array, otherwise returns nil if the array is empty.
- - (NSArray *) arrayByRemovingObject: (id)anObject
Returns a new array by copying the receiver and removing the objects equal to the given one.
- - (NSArray *) arrayByRemovingObjectsInArray: (NSArray *)anArray
Returns a new array by copying the receiver and removing the objects equal to those contained in the given array.
- - (NSArray *) filteredArrayUsingPredicate: (NSPredicate *)aPredicate ignoringObjects: (NSSet *)ignoredObjects
Returns a filtered array as -filteredArrayWithPredicate: does but always includes in the new array the given objects to be ignored by the filtering.
Deprecated
- - (NSArray *) objectsMatchingValue: (id)value forKey: (NSString *)key
Deprecated
Returns the objects on which -valueForKey: returns a value that matches the given one.
For every object in the receiver, -valueForKey: will be invoked with the given key.
NSArray *personsNamedJohn = [persons objectsMatchingValue: @"John" forKey: @"name"];
You should now use -filteredArrayUsingPredicate or -filter instead. For example:
NSArray *personsNamedJohn = [persons filteredArrayUsingPredicate: [NSPredicate predicateWithFormat: @"name == %@", @"John"]];
Deprecated
Returns the objects on which -valueForKey: returns a value that matches the given one.
For every object in the receiver, -valueForKey: will be invoked with the given key.
NSArray *personsNamedJohn = [persons objectsMatchingValue: @"John" forKey: @"name"];
You should now use -filteredArrayUsingPredicate or -filter instead. For example:
NSArray *personsNamedJohn = [persons filteredArrayUsingPredicate: [NSPredicate predicateWithFormat: @"name == %@", @"John"]];
- - (id) firstObjectMatchingValue: (id)value forKey: (NSString *)key
Deprecated
Same as the -objectsMatchingValue:forKey: , except it returns the first object that matches the receiver.
Nil is returned when no object can be matched.