FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
<NSAMutableIndexedSubscript> Protocol Reference

The indexed subscript setter protocol NSAMutableIndexedSubscript must be adopted and implemented by mutable objects used for indexed subscript in modern Objective-C. More...

#import <NSASubscript.h>

Inheritance diagram for <NSAMutableIndexedSubscript>:
<NSAIndexedSubscript> <NSAMutableArrayLikeDataObject> NSAMutableTriple NSAMutableTuple

Instance Methods

(void) - setObject:atIndexedSubscript:
 Replaces the object at the index with the new object, possibly adding the object. More...
 
- Instance Methods inherited from <NSAIndexedSubscript>
(id) - objectAtIndexedSubscript:
 Returns the object located at the specified index. More...
 

Detailed Description

The indexed subscript setter protocol NSAMutableIndexedSubscript must be adopted and implemented by mutable objects used for indexed subscript in modern Objective-C.

Method Documentation

- (void) setObject: (id)  obj
atIndexedSubscript: (NSUInteger)  index 

Replaces the object at the index with the new object, possibly adding the object.

Parameters
anObjectThe object with which to replace the object at index index in the container.
indexThe index of the object to be replaced. This value is expected not to exceed the bounds of the container.

If the index is equal to size of the container the element is expected to be added to the end of the container, growing the container.


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