26 #pragma mark Class Constants
36 #define SCOrderedSetClass @"SCOrderedSet"
80 NSMutableOrderedSet *fOrderedSet;
106 @property (nonatomic, readonly, assign)
SCOrderedSet *ascendingSortedOrderedSet;
112 @property (nonatomic, readonly, assign)
SCOrderedSet *descendingSortedOrderedSet;
121 @property (nonatomic, readonly, assign)
SCOrderedSet *sortedOrderedSet;
142 @property (nonatomic, readonly, assign)
SCArray *allObjects;
148 @property (nonatomic, readonly, assign)
id firstObject;
154 @property (nonatomic, readonly, assign)
id lastObject;
160 @property (nonatomic, readonly, assign)
SCOrderedSet *reversedOrderedSet;
173 @property (nonatomic, readonly, assign)
SCIndex indexOfLastObject;
178 #pragma mark Creating Ordered Sets
179 + (instancetype)orderedSetWithCoder:(NSCoder *)coder;
180 + (instancetype)orderedSetWithContentsOfSerializedFile:(NSString *)path;
181 + (instancetype)orderedSetWithDataDictionary:(NSDictionary *)dictionary;
182 + (instancetype)orderedSetWithDataDictionaryFromFile:(NSString *)path;
183 + (instancetype)orderedSetWithStream:(
SCStream *)stream;
184 + (instancetype)orderedSetWithFileStream:(NSString *)path;
186 + (instancetype)orderedSetWithName:(NSString *)name;
188 + (instancetype)orderedSetWithObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
189 + (instancetype)orderedSetWithCollection:(
id<
SCCollection>)collection;
190 + (instancetype)orderedSetWithArray:(
SCArray *)array;
191 + (instancetype)orderedSetWithSet:(
SCSet *)set;
192 + (instancetype)orderedSetWithOrderedSet:(
SCOrderedSet *)orderedSet;
193 + (instancetype)orderedSet;
195 + (instancetype)orderedSetWithAscendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
196 + (instancetype)orderedSetWithDescendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
197 + (instancetype)orderedSetWithSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
198 + (instancetype)orderedSetWithAscendingSortedCollection:(
id<
SCCollection>)collection;
199 + (instancetype)orderedSetWithDescendingSortedCollection:(
id<
SCCollection>)collection;
200 + (instancetype)orderedSetWithSortedCollection:(
id<
SCCollection>)collection;
203 #pragma mark Initializing Ordered Sets
204 - (instancetype)initWithName:(NSString *)name;
206 - (instancetype)initWithObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
207 - (instancetype)initWithCollection:(
id<
SCCollection>)collection;
208 - (instancetype)initWithArray:(
SCArray *)array;
209 - (instancetype)initWithSet:(
SCSet *)set;
210 - (instancetype)initWithOrderedSet:(
SCOrderedSet *)orderedSet;
211 - (instancetype)init;
213 - (instancetype)initWithAscendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
214 - (instancetype)initWithDescendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
215 - (instancetype)initWithSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
216 - (instancetype)initWithAscendingSortedCollection:(
id<
SCCollection>)collection;
217 - (instancetype)initWithDescendingSortedCollection:(
id<
SCCollection>)collection;
218 - (instancetype)initWithSortedCollection:(
id<
SCCollection>)collection;
221 #pragma mark Copying Ordered Sets
222 - (void)setSet:(
SCSet *)set;
224 - (void)setArray:(
SCArray *)array;
228 - (void)setAscendingSortedCollection:(
id<
SCCollection>)collection;
229 - (void)setDescendingSortedCollection:(
id<
SCCollection>)collection;
230 - (void)setSortedCollection:(
id<
SCCollection>)collection;
233 #pragma mark Comparing Ordered Sets
234 - (BOOL)isSubsetOfOrderedSet:(
id<
SCCollection>)orderedSet;
236 - (BOOL)intersectsOrderedSet:(
id<
SCCollection>)orderedSet;
239 - (BOOL)isEqualToSet:(
SCSet *)set;
240 - (BOOL)isEqualToArray:(
SCArray *)array;
243 #pragma mark Sorting Ordered Sets
244 - (void)sortAscendingWithSorter:(
id<
SCSorter>)sorter;
245 - (void)sortDescendingWithSorter:(
id<
SCSorter>)sorter;
246 - (void)sortWithSorter:(
id<
SCSorter>)sorter;
247 - (void)sortAscending;
248 - (void)sortDescending;
255 #pragma mark Adding Objects
257 - (void)insertAtIndex:(
SCIndex)index objects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
259 - (void)insertAtIndexes:(NSIndexSet *)indexes objects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
260 - (void)insertCollection:(
id<
SCCollection>)collection atIndexes:(NSIndexSet *)indexes;
264 #pragma mark Removing Objects
265 - (void)removeFirstObject;
266 - (void)removeLastObject;
267 - (void)removeObjectAtIndex:(
SCIndex)index;
268 - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
269 - (void)removeObjectsInRange:(NSRange)range;
272 #pragma mark Replacing Objects
274 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes
275 withObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
276 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withCollection:(
id<
SCCollection>)collection;
277 - (void)replaceObjectsInRange:(NSRange)range withObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
278 - (void)replaceObjectsInRange:(NSRange)range withCollection:(
id<
SCCollection>)collection;
281 #pragma mark Moving Objects
282 - (void)exchangeObjectAtIndex:(
SCIndex)index withObjectAtIndex:(
SCIndex)destination;
283 - (void)moveObjectAtIndex:(
SCIndex)index toIndex:(
SCIndex)destination;
287 #pragma mark Querying an Ordered Set
288 - (id)objectAtIndex:(
SCIndex)index;
289 - (
SCArray *)objectsAtIndexes:(NSIndexSet *)indexes;
292 #pragma mark Finding Objects in an Ordered Set
296 #pragma mark Combining and Recombining Ordered Sets
301 - (void)intersectOrderedSet:(
id<
SCCollection>)orderedSet;
Unordered set class.
Definition: SCSet.h:71
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:101
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:226