26 #pragma mark Class Constants
36 #define SCOrderedSetClass @"SCOrderedSet"
80 NSMutableOrderedSet *fOrderedSet;
108 @property (nonatomic, readonly, assign)
SCOrderedSet *ascendingSortedOrderedSet;
114 @property (nonatomic, readonly, assign)
SCOrderedSet *descendingSortedOrderedSet;
123 @property (nonatomic, readonly, assign)
SCOrderedSet *sortedOrderedSet;
144 @property (nonatomic, readonly, assign)
SCArray *allObjects;
150 @property (nonatomic, readonly, assign)
id firstObject;
156 @property (nonatomic, readonly, assign)
id lastObject;
162 @property (nonatomic, readonly, assign)
SCOrderedSet *reversedOrderedSet;
175 @property (nonatomic, readonly, assign)
SCIndex indexOfLastObject;
180 #pragma mark Creating Ordered Sets
181 + (instancetype)orderedSetWithCoder:(NSCoder *)coder;
182 + (instancetype)orderedSetWithContentsOfSerializedFile:(NSString *)path;
183 + (instancetype)orderedSetWithDataDictionary:(NSDictionary *)dictionary;
184 + (instancetype)orderedSetWithDataDictionaryFromFile:(NSString *)path;
185 + (instancetype)orderedSetWithStream:(
SCStream *)stream;
186 + (instancetype)orderedSetWithFileStream:(NSString *)path;
187 + (instancetype)orderedSetWithData:(NSData *)data;
188 + (instancetype)orderedSetWithContentsOfFile:(NSString *)path;
189 + (instancetype)orderedSetWithContentsOfURL:(NSURL *)url;
190 + (instancetype)orderedSetWithContentsOfURLString:(NSString *)urlString;
192 + (instancetype)orderedSetWithName:(NSString *)name;
194 + (instancetype)orderedSetWithObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
195 + (instancetype)orderedSetWithCollection:(
id<
SCCollection>)collection;
196 + (instancetype)orderedSetWithArray:(
SCArray *)array;
197 + (instancetype)orderedSetWithSet:(
SCSet *)set;
198 + (instancetype)orderedSetWithOrderedSet:(
SCOrderedSet *)orderedSet;
199 + (instancetype)orderedSet;
201 + (instancetype)orderedSetWithAscendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
202 + (instancetype)orderedSetWithDescendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
203 + (instancetype)orderedSetWithSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
204 + (instancetype)orderedSetWithAscendingSortedCollection:(
id<
SCCollection>)collection;
205 + (instancetype)orderedSetWithDescendingSortedCollection:(
id<
SCCollection>)collection;
206 + (instancetype)orderedSetWithSortedCollection:(
id<
SCCollection>)collection;
209 #pragma mark Initializing Ordered Sets
210 - (instancetype)initWithName:(NSString *)name;
212 - (instancetype)initWithObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
213 - (instancetype)initWithCollection:(
id<
SCCollection>)collection;
214 - (instancetype)initWithArray:(
SCArray *)array;
215 - (instancetype)initWithSet:(
SCSet *)set;
216 - (instancetype)initWithOrderedSet:(
SCOrderedSet *)orderedSet;
217 - (instancetype)init;
219 - (instancetype)initWithAscendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
220 - (instancetype)initWithDescendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
221 - (instancetype)initWithSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
222 - (instancetype)initWithAscendingSortedCollection:(
id<
SCCollection>)collection;
223 - (instancetype)initWithDescendingSortedCollection:(
id<
SCCollection>)collection;
224 - (instancetype)initWithSortedCollection:(
id<
SCCollection>)collection;
227 #pragma mark Copying Ordered Sets
228 - (void)setSet:(
SCSet *)set;
230 - (void)setArray:(
SCArray *)array;
234 - (void)setAscendingSortedCollection:(
id<
SCCollection>)collection;
235 - (void)setDescendingSortedCollection:(
id<
SCCollection>)collection;
236 - (void)setSortedCollection:(
id<
SCCollection>)collection;
239 #pragma mark Comparing Ordered Sets
240 - (BOOL)isSubsetOfOrderedSet:(
id<
SCCollection>)orderedSet;
242 - (BOOL)intersectsOrderedSet:(
id<
SCCollection>)orderedSet;
245 - (BOOL)isEqualToSet:(
SCSet *)set;
246 - (BOOL)isEqualToArray:(
SCArray *)array;
249 #pragma mark Deriving New Ordered Sets
261 #pragma mark Sorting Ordered Sets
262 - (void)sortAscendingWithSorter:(
id<
SCSorter>)sorter;
263 - (void)sortDescendingWithSorter:(
id<
SCSorter>)sorter;
264 - (void)sortWithSorter:(
id<
SCSorter>)sorter;
265 - (void)sortAscending;
266 - (void)sortDescending;
273 #pragma mark Adding Objects
275 - (void)insertAtIndex:(
SCIndex)index objects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
277 - (void)insertAtIndexes:(NSIndexSet *)indexes objects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
278 - (void)insertCollection:(
id<
SCCollection>)collection atIndexes:(NSIndexSet *)indexes;
280 - (void)addObjectsFromArray:(
SCArray *)array;
281 - (void)addArray:(
SCArray *)array;
282 - (void)addObjectsFromSet:(
SCSet *)set;
283 - (void)addSet:(
SCSet *)set;
284 - (void)addObjectsFromOrderedSet:(
SCOrderedSet *)orderedSet;
288 #pragma mark Removing Objects
289 - (void)removeFirstObject;
290 - (void)removeLastObject;
291 - (void)removeObjectAtIndex:(
SCIndex)index;
292 - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
293 - (void)removeObjectsInRange:(NSRange)range;
296 #pragma mark Replacing Objects
298 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes
299 withObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
300 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withCollection:(
id<
SCCollection>)collection;
301 - (void)replaceObjectsInRange:(NSRange)range withObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
302 - (void)replaceObjectsInRange:(NSRange)range withCollection:(
id<
SCCollection>)collection;
305 #pragma mark Moving Objects
306 - (void)exchangeObjectAtIndex:(
SCIndex)index withObjectAtIndex:(
SCIndex)destination;
307 - (void)moveObjectAtIndex:(
SCIndex)index toIndex:(
SCIndex)destination;
311 #pragma mark Querying an Ordered Set
312 - (id)objectAtIndex:(
SCIndex)index;
313 - (
SCArray *)objectsAtIndexes:(NSIndexSet *)indexes;
316 #pragma mark Finding Objects in an Ordered Set
320 #pragma mark Combining and Recombining Ordered Sets
325 - (void)intersectOrderedSet:(
id<
SCCollection>)orderedSet;
Unordered set class.
Definition: SCSet.h:69
Mutable indexed collection protocol.
Definition: SCCollectionProtocols.h:850
Ordered set class.
Definition: SCOrderedSet.h:79
Abstract implementation of the protocol SCSorter.
Definition: SCSorter.h:136
Indexed collections protocol.
Definition: SCCollectionProtocols.h:772
Protocol and class SCSorter header file.
Collections communications protocol.
Definition: SCCollectioning.h:78
Abstract collections class.
Definition: SCCollection.h:97
Class SCCollection header file.
Array class.
Definition: SCArray.h:81
NSUInteger SCIndex
Definition: SCCollectionProtocols.h:50
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:238