22 #import <scl/SCCollection.h>
23 #import <scl/SCSorter.h>
26 #pragma mark Class Constants
31 #define SCOrderedSetClass @"SCOrderedSet"
74 NSMutableOrderedSet *fOrderedSet;
123 @property (nonatomic, retain, readonly, getter=
firstObject)
id firstObject;
129 @property (nonatomic, retain, readonly, getter=
lastObject)
id lastObject;
153 #pragma mark Creating Ordered Sets
154 + (instancetype)orderedSetWithCoder:(NSCoder *)coder;
155 + (instancetype)orderedSetWithContentsOfSerializedFile:(NSString *)path;
156 + (instancetype)orderedSetWithDataDictionary:(NSDictionary *)dictionary;
157 + (instancetype)orderedSetWithDataDictionaryFromFile:(NSString *)path;
158 + (instancetype)orderedSetWithStream:(
SCStream *)stream;
159 + (instancetype)orderedSetWithFileStream:(NSString *)path;
161 + (instancetype)orderedSetWithName:(NSString *)name;
163 + (instancetype)orderedSetWithObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
164 + (instancetype)orderedSetWithCollection:(
id<
SCCollection>)collection;
165 + (instancetype)orderedSetWithArray:(
SCArray *)array;
166 + (instancetype)orderedSetWithSet:(
SCSet *)set;
167 + (instancetype)orderedSetWithOrderedSet:(
SCOrderedSet *)orderedSet;
168 + (instancetype)orderedSet;
170 + (instancetype)orderedSetWithAscendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
171 + (instancetype)orderedSetWithDescendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
172 + (instancetype)orderedSetWithSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
173 + (instancetype)orderedSetWithAscendingSortedCollection:(
id<
SCCollection>)collection;
174 + (instancetype)orderedSetWithDescendingSortedCollection:(
id<
SCCollection>)collection;
175 + (instancetype)orderedSetWithSortedCollection:(
id<
SCCollection>)collection;
178 #pragma mark Initializing Ordered Sets
179 - (instancetype)initWithName:(NSString *)name;
181 - (instancetype)initWithObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
182 - (instancetype)initWithCollection:(
id<
SCCollection>)collection;
183 - (instancetype)initWithArray:(
SCArray *)array;
184 - (instancetype)initWithSet:(
SCSet *)set;
185 - (instancetype)initWithOrderedSet:(
SCOrderedSet *)orderedSet;
186 - (instancetype)init;
188 - (instancetype)initWithAscendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
189 - (instancetype)initWithDescendingSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
190 - (instancetype)initWithSortedCollection:(
id<
SCCollection>)collection sorter:(
id<
SCSorter>)sorter;
191 - (instancetype)initWithAscendingSortedCollection:(
id<
SCCollection>)collection;
192 - (instancetype)initWithDescendingSortedCollection:(
id<
SCCollection>)collection;
193 - (instancetype)initWithSortedCollection:(
id<
SCCollection>)collection;
196 #pragma mark Copying Ordered Sets
197 - (void)setSet:(
SCSet *)set;
202 - (void)setAscendingSortedCollection:(
id<
SCCollection>)collection;
203 - (void)setDescendingSortedCollection:(
id<
SCCollection>)collection;
204 - (void)setSortedCollection:(
id<
SCCollection>)collection;
207 #pragma mark Comparing Ordered Sets
208 - (BOOL)isSubsetOfOrderedSet:(
id<
SCCollection>)orderedSet;
210 - (BOOL)intersectsOrderedSet:(
id<
SCCollection>)orderedSet;
212 - (BOOL)isEqualToOrderedSet:(
id<
SCCollection>)orderedSet;
213 - (BOOL)isEqualToContentsOfOrderedSet:(
SCOrderedSet *)orderedSet;
216 #pragma mark Sorting Ordered Sets
217 - (void)sortAscendingWithSorter:(
id<
SCSorter>)sorter;
218 - (void)sortDescendingWithSorter:(
id<
SCSorter>)sorter;
219 - (void)sortWithSorter:(
id<
SCSorter>)sorter;
220 - (void)sortAscending;
221 - (void)sortDescending;
231 #pragma mark Adding Objects
233 - (void)insertAtIndex:(
SCIndex)index objects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
235 - (void)insertAtIndexes:(NSIndexSet *)indexes objects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
236 - (void)insertCollection:(
id<
SCCollection>)collection atIndexes:(NSIndexSet *)indexes;
240 #pragma mark Removing Objects
241 - (void)removeFirstObject;
242 - (void)removeLastObject;
243 - (void)removeObjectAtIndex:(
SCIndex)index;
244 - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
245 - (void)removeObjectsInRange:(NSRange)range;
248 #pragma mark Replacing Objects
250 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes
251 withObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
252 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withCollection:(
id<
SCCollection>)collection;
253 - (void)replaceObjectsInRange:(NSRange)range withObjects:(
id<
SCCollectioning>)object, ... NS_REQUIRES_NIL_TERMINATION;
254 - (void)replaceObjectsInRange:(NSRange)range withCollection:(
id<
SCCollection>)collection;
257 #pragma mark Moving Objects
258 - (void)exchangeObjectAtIndex:(
SCIndex)index withObjectAtIndex:(
SCIndex)destination;
259 - (void)moveObjectAtIndex:(
SCIndex)index toIndex:(
SCIndex)destination;
263 #pragma mark Querying an Ordered Set
267 - (id)objectAtIndex:(
SCIndex)index;
268 - (
SCArray *)objectsAtIndexes:(NSIndexSet *)indexes;
272 #pragma mark Finding Objects in an Ordered Set
277 #pragma mark Combining and Recombining Ordered Sets
282 - (void)intersectOrderedSet:(
id<
SCCollection>)orderedSet;
Класс неупорядоченного множества объектов
Definition: SCSet.h:65
SCOrderedSet * sortedOrderedSet
Definition: SCOrderedSet.h:96
Протокол классов изменяемых индексированных коллекций
Definition: SCCollectionProtocols.h:1029
SCIndex indexOfLastObject
Definition: SCOrderedSet.h:148
Класс упорядоченного множества объектов
Definition: SCOrderedSet.h:73
Класс абстрактного алгоритма сортировки данных
Definition: SCSorter.h:130
id firstObject
Definition: SCOrderedSet.h:123
Протокол классов индексированных коллекций
Definition: SCCollectionProtocols.h:939
SCOrderedSet * reversedOrderedSet
Definition: SCOrderedSet.h:135
SCArray * allObjects
Definition: SCOrderedSet.h:117
NSUInteger SCIndex
Definition: SCTypes.h:238
Протокол взаимодействия с механизмом коллекций
Definition: SCCollectioning.h:80
Абстрактный класс механизма коллекций библиотеки
Definition: SCCollection.h:94
id lastObject
Definition: SCOrderedSet.h:129
Класс массивов объектов
Definition: SCArray.h:75
Абстрактный класс потоков библиотеки
Definition: SCStream.h:242