Skip to content

Commit 1afc84c

Browse files
committed
Add generic types for object collections to PFQueryState.
1 parent 9d09f3c commit 1afc84c

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

Parse/Internal/Query/State/PFMutableQueryState.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
- (void)sortByKey:(NSString *)key ascending:(BOOL)ascending;
6060
- (void)addSortKey:(NSString *)key ascending:(BOOL)ascending;
61-
- (void)addSortKeysFromSortDescriptors:(NSArray *)sortDescriptors;
61+
- (void)addSortKeysFromSortDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors;
6262

6363
///--------------------------------------
6464
#pragma mark - Includes
@@ -71,7 +71,7 @@
7171
#pragma mark - Selected Keys
7272
///--------------------------------------
7373

74-
- (void)selectKeys:(NSArray *)keys;
74+
- (void)selectKeys:(NSArray<NSString *> *)keys;
7575

7676
///--------------------------------------
7777
#pragma mark - Redirect

Parse/Internal/Query/State/PFMutableQueryState.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#import "PFQueryState_Private.h"
1414

1515
@interface PFMutableQueryState () {
16-
NSMutableDictionary *_conditions;
17-
NSMutableArray *_sortKeys;
18-
NSMutableSet *_includedKeys;
19-
NSMutableDictionary *_extraOptions;
16+
NSMutableDictionary<NSString *, id> *_conditions;
17+
NSMutableArray<NSString *> *_sortKeys;
18+
NSMutableSet<NSString *> *_includedKeys;
19+
NSMutableDictionary<NSString *, NSString *> *_extraOptions;
2020
}
2121

2222
@end
@@ -133,7 +133,7 @@ - (void)addSortKey:(NSString *)key ascending:(BOOL)ascending {
133133
}
134134
}
135135

136-
- (void)addSortKeysFromSortDescriptors:(NSArray *)sortDescriptors {
136+
- (void)addSortKeysFromSortDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors {
137137
[_sortKeys removeAllObjects];
138138
for (NSSortDescriptor *sortDescriptor in sortDescriptors) {
139139
[self addSortKey:sortDescriptor.key ascending:sortDescriptor.ascending];
@@ -164,7 +164,7 @@ - (void)includeKeys:(NSArray<NSString *> *)keys {
164164
#pragma mark - Selected Keys
165165
///--------------------------------------
166166

167-
- (void)selectKeys:(NSArray *)keys {
167+
- (void)selectKeys:(NSArray<NSString *> *)keys {
168168
if (keys) {
169169
_selectedKeys = (_selectedKeys ? [_selectedKeys setByAddingObjectsFromArray:keys] : [NSSet setWithArray:keys]);
170170
} else {

Parse/Internal/Query/State/PFQueryState.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
@property (nonatomic, copy, readonly) NSString *parseClassName;
1919

20-
@property (nonatomic, copy, readonly) NSDictionary *conditions;
20+
@property (nonatomic, copy, readonly) NSDictionary<NSString *, id> *conditions;
2121

22-
@property (nonatomic, copy, readonly) NSArray *sortKeys;
22+
@property (nonatomic, copy, readonly) NSArray<NSString *> *sortKeys;
2323
@property (nonatomic, copy, readonly) NSString *sortOrderString;
2424

25-
@property (nonatomic, copy, readonly) NSSet *includedKeys;
26-
@property (nonatomic, copy, readonly) NSSet *selectedKeys;
27-
@property (nonatomic, copy, readonly) NSDictionary *extraOptions;
25+
@property (nonatomic, copy, readonly) NSSet<NSString *> *includedKeys;
26+
@property (nonatomic, copy, readonly) NSSet<NSString *> *selectedKeys;
27+
@property (nonatomic, copy, readonly) NSDictionary<NSString *, NSString *> *extraOptions;
2828

2929
@property (nonatomic, assign, readonly) NSInteger limit;
3030
@property (nonatomic, assign, readonly) NSInteger skip;

Parse/Internal/Query/State/PFQueryState_Private.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
@protected
1414
NSString *_parseClassName;
1515

16-
NSDictionary *_conditions;
16+
NSDictionary<NSString *, id> *_conditions;
1717

18-
NSArray *_sortKeys;
18+
NSArray<NSString *> *_sortKeys;
1919

20-
NSSet *_includedKeys;
21-
NSSet *_selectedKeys;
22-
NSDictionary *_extraOptions;
20+
NSSet<NSString *> *_includedKeys;
21+
NSSet<NSString *> *_selectedKeys;
22+
NSDictionary<NSString *, NSString *> *_extraOptions;
2323

2424
NSInteger _limit;
2525
NSInteger _skip;

0 commit comments

Comments
 (0)