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

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

#import <NSASubscript.h>

Inheritance diagram for <NSAMutableKeyedSubscript>:
<NSAKeyedSubscript>

Instance Methods

(void) - setObject:forKeyedSubscript:
 Adds a given key-value pair to the container. More...
 
- Instance Methods inherited from <NSAKeyedSubscript>
(id) - objectForKeyedSubscript:
 Returns the value associated with a given key. More...
 

Detailed Description

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

Method Documentation

- (void) setObject: (id)  obj
forKeyedSubscript: (id< NSCopying >)  key 

Adds a given key-value pair to the container.

Parameters
objectThe value for key. The container should maintain a strong reference to the object. Raise an NSInvalidArgumentException if object shouldn't be a nil.
keyThe key for value. The key should be copied (using copyWithZone:; keys must conform to the NSCopying protocol). Raise an NSInvalidArgumentException if key is nil. If key already exists in the container object takes its place.

This method is expected to be identical to setObject:forKey:.


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