FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSArray.h
Go to the documentation of this file.
1 //
2 // NSArray.h
3 // FoundationExtension
4 //
5 // Created by Jeong YunWon on 11. 1. 25..
6 // Copyright 2011 youknowone.org All rights reserved.
7 //
8 
16 #import <Foundation/Foundation.h>
17 
22 
26 - (BOOL)hasIndex:(NSUInteger)index;
27 
28 @end
29 
37 
47 - (instancetype)initWithData:(NSData *)data;
48 
59 - (instancetype)initWithData:(NSData *)data format:(NSPropertyListFormat *)format error:(NSError **)error;
60 
68 - (instancetype)initWithEnumerator:(id<NSFastEnumeration>)enumerator;
81 - (instancetype)initWithEnumerator:(id<NSFastEnumeration>)enumerator copyItems:(BOOL)flag;
82 
89 + (instancetype)arrayWithData:(NSData *)data;
90 
95 + (instancetype)arrayWithData:(NSData *)data format:(NSPropertyListFormat *)format error:(NSError **)error;
96 
101 + (instancetype)arrayWithEnumerator:(id<NSFastEnumeration>)enumerator;
102 
109 - (NSArray *)subarrayFromIndex:(NSUInteger)index;
110 
117 - (NSArray *)subarrayToIndex:(NSUInteger)index;
118 
126 - (NSArray *)subarrayFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex;
127 
134 - (NSArray *)subarrayFromIndex:(NSUInteger)fromIndex length:(NSUInteger)length;
135 
136 @end
137 
138 
143 
149 - (void)moveObjectAtIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex;
150 
151 @end
152 
153 
159 
169 - (NSInteger)integerAtIndex:(NSUInteger)index;
170 
181 - (NSUInteger)indexOfInteger:(NSInteger)value;
182 
183 @end
184 
189 
194 - (id)randomObject;
195 
201 - (NSArray *)randomObjectsOfCount:(NSUInteger)count;
202 
206 - (NSArray *)shuffledArray;
207 
208 @end
209 
214 
218 - (id)removeRandomObject;
219 
223 - (void)shuffle;
224 
225 @end
226 
227 
232 
237 - (id):(NSUInteger)index __deprecated;
238 
239 @end
240 
245 
250 - (id)popRandomObject __deprecated;
251 
252 @end
Deprecated methods of NSArray extensions.
Definition: NSArray.h:231
NSArray shortcut methods for NSNumber.
Definition: NSArray.h:158
Deprecated methods of NSMutableArray extensions.
Definition: NSArray.h:244
Random selection in NSArray objects.
Definition: NSArray.h:188
Random selection in NSMutableArray objects.
Definition: NSArray.h:213
NSArray shortcut methods extension.
Definition: NSArray.h:21
NSArray rearrangement methods extension.
Definition: NSArray.h:142
NSArray creation methods extension with NSData or NSFastEnumeration
Definition: NSArray.h:36