NSDictionary(SafeExpectations) Category Reference
Declared in | NSDictionary+SafeExpectations.h NSDictionary+SafeExpectations.m |
Tasks
-
– stringForKey:
Returns a NSString value for the specified key.
-
– numberForKey:
Returns a NSNumber value for the specified key.
-
– arrayForKey:
Returns a NSArray value for the specified key.
-
– dictionaryForKey:
Returns a NSDictionary value for the specified key.
-
– objectForKeyPath:
Returns an object for the specified keyPath
-
– stringForKeyPath:
Returns an object for the specified keyPath
-
– numberForKeyPath:
Returns an object for the specified keyPath
-
– arrayForKeyPath:
Returns an object for the specified keyPath
-
– dictionaryForKeyPath:
Returns an object for the specified keyPath
Instance Methods
arrayForKey:
Returns a NSArray value for the specified key.
- (NSArray *)arrayForKey:(id)key
Parameters
- key
The key for which to return the corresponding value
Return Value
the resulting array. If the result is not a NSArray, it returns nil
Discussion
Returns a NSArray value for the specified key.
Declared In
NSDictionary+SafeExpectations.h
arrayForKeyPath:
Returns an object for the specified keyPath
- (NSArray *)arrayForKeyPath:(id)keyPath
Parameters
- keyPath
A key path of the form relationship.property, see objectForKeyPath:
Return Value
The value for the derived property identified by keyPath. If the keyPath is not valid or the result is not a NSArray, it returns nil
Discussion
Returns an object for the specified keyPath
Declared In
NSDictionary+SafeExpectations.h
dictionaryForKey:
Returns a NSDictionary value for the specified key.
- (NSDictionary *)dictionaryForKey:(id)key
Parameters
- key
The key for which to return the corresponding value
Return Value
the resulting dictionary. If the result is not a NSDictionary, it returns nil
Discussion
Returns a NSDictionary value for the specified key.
Declared In
NSDictionary+SafeExpectations.h
dictionaryForKeyPath:
Returns an object for the specified keyPath
- (NSDictionary *)dictionaryForKeyPath:(id)keyPath
Parameters
- keyPath
A key path of the form relationship.property, see objectForKeyPath:
Return Value
The value for the derived property identified by keyPath. If the keyPath is not valid or the result is not a NSDictionary, it returns nil
Discussion
Returns an object for the specified keyPath
Declared In
NSDictionary+SafeExpectations.h
numberForKey:
Returns a NSNumber value for the specified key.
- (NSNumber *)numberForKey:(id)key
Parameters
- key
The key for which to return the corresponding value
Return Value
the resulting number. If the result is not a NSNumber and can’t converted to one, it returns nil
Discussion
Returns a NSNumber value for the specified key.
Declared In
NSDictionary+SafeExpectations.h
numberForKeyPath:
Returns an object for the specified keyPath
- (NSNumber *)numberForKeyPath:(id)keyPath
Parameters
- keyPath
A key path of the form relationship.property, see objectForKeyPath:
Return Value
The value for the derived property identified by keyPath. If the keyPath is not valid or the result is not a NSNumber or can’t be converted to one, it returns nil
Discussion
Returns an object for the specified keyPath
Declared In
NSDictionary+SafeExpectations.h
objectForKeyPath:
Returns an object for the specified keyPath
- (id)objectForKeyPath:(NSString *)keyPath
Parameters
- keyPath
A key path of the form relationship.property (with one or more relationships); for example “department.name” or “department.manager.lastName”
Return Value
The value for the derived property identified by keyPath. If the keyPath is not valid, it returns nil
Discussion
Returns an object for the specified keyPath
Declared In
NSDictionary+SafeExpectations.h
stringForKey:
Returns a NSString value for the specified key.
- (NSString *)stringForKey:(id)key
Parameters
- key
The key for which to return the corresponding value
Return Value
the resulting string. If the result is not a NSString and can’t converted to one, it returns nil
Discussion
Returns a NSString value for the specified key.
Declared In
NSDictionary+SafeExpectations.h
stringForKeyPath:
Returns an object for the specified keyPath
- (NSString *)stringForKeyPath:(id)keyPath
Parameters
- keyPath
A key path of the form relationship.property, see objectForKeyPath:
Return Value
The value for the derived property identified by keyPath. If the keyPath is not valid or the result is not a NSString or can’t be converted to one, it returns nil
Discussion
Returns an object for the specified keyPath
Declared In
NSDictionary+SafeExpectations.h