-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNSDictionary+Utilities.h
47 lines (27 loc) · 1.07 KB
/
NSDictionary+Utilities.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// author: fabrice truillot de chambrier
//
// © 2009-2015, men in silicium sàrl
//
#import <Foundation/Foundation.h>
@interface NSDictionary (Utilities)
- (BOOL) isMutable;
- (BOOL) isMutableDictionary;
- (BOOL) containsKey: (id) key;
- (BOOL) containsObject: (id) object;
- (id) objectForKeyCaseInsensitive: (id) key;
- (NSDictionary*) exchangeObjectsAndKeys: (BOOL*) lossy;
- (BOOL) hasValueForKey: (NSString*) key;
- (BOOL) hasValueForKeyPath: (NSString*) path;
- (id) valueForKey: (NSString*) key1 forKey: (NSString*) key2;
- (NSDictionary*) entriesPassingTest: (BOOL (^)( id key, id obj, BOOL* stop )) predicate;
@end
@interface NSMutableDictionary (Creation)
+ (instancetype) newWithCapacity: (NSUInteger) capacity;
@end
@interface NSMutableDictionary (Utilities)
- (void) intersectKeysWithDictionary: (NSDictionary*) dictionary;
- (void) intersectKeysWithArray: (NSArray*) keys;
- (void) setValue: (id) value forKey: (NSString*) key1 forKey: (NSString*) key2;
- (void) setValue: (id) value forKeyPath: (NSString*) keyPath create: (BOOL) create;
@end