-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathNSArray+TBL.h
25 lines (22 loc) · 1.1 KB
/
NSArray+TBL.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
#import <Foundation/Foundation.h>
@interface NSArray (TBL)
-(id)objectAtIndex:(NSUInteger)index kindOfClass:(Class)aClass;
-(BOOL)boolAtIndex:(NSUInteger)index defaultValue:(BOOL)defaultValue;
-(NSNumber *)numberAtIndex:(NSUInteger)index;
-(NSString *)stringAtIndex:(NSUInteger)index;
-(NSString *)stringOrEmptyStringAtIndex:(NSUInteger)index;
-(NSString *)stringOrNilIfEmptyStringAtIndex:(NSUInteger)index;
-(NSString *)stringFromObjectAtIndex:(NSUInteger)index;
-(NSString *)stringFromObjectOrEmptyStringAtIndex:(NSUInteger)index;
-(NSArray *)arrayAtIndex:(NSUInteger)index;
-(NSDictionary *)dictionaryAtIndex:(NSUInteger)index;
-(NSArray *)subarrayFromIndex:(NSUInteger)index;
-(NSArray *)subarrayToIndex:(NSUInteger)index;
-(id)randomObject;
-(void)each:(void (^)(id thing))blockToExecute;
-(void)eachKindOfClass:(Class)aClass block:(void (^)(id thing))blockToExecute;
-(void)eachNumber:(void (^)(NSNumber *thing))blockToExecute;
-(void)eachString:(void (^)(NSString *thing))blockToExecute;
-(void)eachArray:(void (^)(NSArray *thing))blockToExecute;
-(void)eachDictionary:(void (^)(NSDictionary *thing))blockToExecute;
@end