#include <NSDictionaryOOExtensions.h>
Definition at line 33 of file NSDictionaryOOExtensions.h.
◆ dictionaryByAddingEntriesFromDictionary:
- (NSDictionary *) dictionaryByAddingEntriesFromDictionary: |
|
(NSDictionary *) | dictionary |
|
Definition at line 1 of file NSDictionaryOOExtensions.m.
61 :(NSDictionary *)dictionary
62{
63
64 if (dictionary ==
nil)
return [[
self copy] autorelease];
65
66 NSMutableDictionary *temp = [self mutableCopy];
67 [temp addEntriesFromDictionary:dictionary];
68 NSDictionary *result = [[temp copy] autorelease];
69 [temp release];
70
71 return result;
72}
References nil.
◆ dictionaryByAddingObject:forKey:
- (NSDictionary *) dictionaryByAddingObject: |
|
(id) | object |
forKey: |
|
(id) | key |
Definition at line 1 of file NSDictionaryOOExtensions.m.
33 :(id)object forKey:(id)key
34{
35
36 if (
object ==
nil || key ==
nil)
return [[
self copy] autorelease];
37
38 NSMutableDictionary *temp = [self mutableCopy];
39 [temp setObject:object forKey:key];
40 NSDictionary *result = [[temp copy] autorelease];
41 [temp release];
42
43 return result;
44}
◆ dictionaryByRemovingObjectForKey:
- (NSDictionary *) dictionaryByRemovingObjectForKey: |
|
(id) | key |
|
Definition at line 1 of file NSDictionaryOOExtensions.m.
47 :(id)key
48{
49
50 if (key ==
nil)
return [[
self copy] autorelease];
51
52 NSMutableDictionary *temp = [self mutableCopy];
53 [temp removeObjectForKey:key];
54 NSDictionary *result = [[temp copy] autorelease];
55 [temp release];
56
57 return result;
58}
The documentation for this category was generated from the following files: