Samond Classes Library 1.2.1-RELEASE build 181
List of all members
SCOrderedSet Class Reference

Ordered set class. More...

#import <SCOrderedSet.h>

Inheritance diagram for SCOrderedSet:
SCCollection <SCIndexedCollection> <SCMutableIndexedCollection> SCObject <SCMutableCollection> <SCCollection> <SCIndexedCollection> <SCCollection> <SCCollection>

Creating Ordered Sets

(instancetype) + orderedSetWithCoder:
 
(instancetype) + orderedSetWithContentsOfSerializedFile:
 
(instancetype) + orderedSetWithDataDictionary:
 
(instancetype) + orderedSetWithDataDictionaryFromFile:
 
(instancetype) + orderedSetWithStream:
 
(instancetype) + orderedSetWithFileStream:
 
(instancetype) + orderedSetWithName:
 
(instancetype) + orderedSetWithObject:
 
(instancetype) + orderedSetWithObjects:
 
(instancetype) + orderedSetWithCollection:
 
(instancetype) + orderedSetWithArray:
 
(instancetype) + orderedSetWithSet:
 
(instancetype) + orderedSetWithOrderedSet:
 
(instancetype) + orderedSet
 
(instancetype) + orderedSetWithAscendingSortedCollection:sorter:
 
(instancetype) + orderedSetWithDescendingSortedCollection:sorter:
 
(instancetype) + orderedSetWithSortedCollection:sorter:
 
(instancetype) + orderedSetWithAscendingSortedCollection:
 
(instancetype) + orderedSetWithDescendingSortedCollection:
 
(instancetype) + orderedSetWithSortedCollection:
 

Initializing Ordered Sets

(instancetype) - initWithName:
 
(instancetype) - initWithObject:
 
(instancetype) - initWithObjects:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithArray:
 
(instancetype) - initWithSet:
 
(instancetype) - initWithOrderedSet:
 
(instancetype) - init
 
(instancetype) - initWithAscendingSortedCollection:sorter:
 
(instancetype) - initWithDescendingSortedCollection:sorter:
 
(instancetype) - initWithSortedCollection:sorter:
 
(instancetype) - initWithAscendingSortedCollection:
 
(instancetype) - initWithDescendingSortedCollection:
 
(instancetype) - initWithSortedCollection:
 

Copying Ordered Sets

(void) - setSet:
 
(void) - setOrderedSet:
 
(void) - setAscendingSortedCollection:sorter:
 
(void) - setDescendingSortedCollection:sorter:
 
(void) - setSortedCollection:sorter:
 
(void) - setAscendingSortedCollection:
 
(void) - setDescendingSortedCollection:
 
(void) - setSortedCollection:
 

Comparing Ordered Sets

(BOOL) - isSubsetOfOrderedSet:
 
(BOOL) - isSubsetOfSet:
 
(BOOL) - intersectsOrderedSet:
 
(BOOL) - intersectsSet:
 
(BOOL) - isEqualToOrderedSet:
 
(BOOL) - isEqualToContentsOfOrderedSet:
 

Sorting Ordered Sets

SCOrderedSetsortedOrderedSet
 
(void) - sortAscendingWithSorter:
 
(void) - sortDescendingWithSorter:
 
(void) - sortWithSorter:
 
(void) - sortAscending
 
(void) - sortDescending
 
(void) - sort
 
(SCOrderedSet *) - ascendingSortedOrderedSetWithSorter:
 
(SCOrderedSet *) - descendingSortedOrderedSetWithSorter:
 
(SCOrderedSet *) - sortedOrderedSetWithSorter:
 
(SCOrderedSet *) - ascendingSortedOrderedSet
 
(SCOrderedSet *) - descendingSortedOrderedSet
 

Adding Objects

(void) - insertObject:atIndex:
 
(void) - insertAtIndex:objects:
 
(void) - insertCollection:atIndex:
 
(void) - insertAtIndexes:objects:
 
(void) - insertCollection:atIndexes:
 
(void) - setObject:atIndex:
 

Removing Objects

(void) - removeFirstObject
 
(void) - removeLastObject
 
(void) - removeObjectAtIndex:
 
(void) - removeObjectsAtIndexes:
 
(void) - removeObjectsInRange:
 

Replacing Objects

(void) - replaceObjectAtIndex:withObject:
 
(void) - replaceObjectsAtIndexes:withObjects:
 
(void) - replaceObjectsAtIndexes:withCollection:
 
(void) - replaceObjectsInRange:withObjects:
 
(void) - replaceObjectsInRange:withCollection:
 

Moving Objects

(void) - exchangeObjectAtIndex:withObjectAtIndex:
 
(void) - moveObjectAtIndex:toIndex:
 
(void) - reverse
 

Querying an Ordered Set

SCArrayallObjects
 
id firstObject
 
id lastObject
 
SCOrderedSetreversedOrderedSet
 
(id) - objectAtIndex:
 
(SCArray *) - objectsAtIndexes:
 

Finding Objects in an Ordered Set

SCIndex indexOfLastObject
 
(SCIndex- indexOfObject:
 

Combining and Recombining Ordered Sets

(void) - unionOrderedSet:
 
(void) - unionSet:
 
(void) - minusOrderedSet:
 
(void) - minusSet:
 
(void) - intersectOrderedSet:
 
(void) - intersectSet:
 

Additional Inherited Members

- Instance Methods inherited from SCCollection
(void) - setCollection:
 
(void) - setObject:
 
(void) - setObjects:
 
(BOOL) - isEqualToCollection:
 
(BOOL) - isEqual:
 
(void) - enumerateWithDelegate:
 
(void) - enumerate
 
(void) - reverseEnumerateWithDelegate:
 
(void) - reverseEnumerate
 
(void) - addObjects:
 
(void) - addCollection:
 
(void) - removeObjectsWithClassName:
 
(void) - removeCollection:
 
(void) - removeObjects:
 
(BOOL) - containsObjects:
 
(BOOL) - containsCollection:
 
(BOOL) - containsAnyObject:
 
(BOOL) - containsAnyObjectFromCollection:
 
(BOOL) - isCollection
 
(BOOL) - isLibraryCollection
 
(BOOL) - isFoundationCollection
 
(BOOL) - isArray
 
(BOOL) - isLibraryArray
 
(BOOL) - isFoundationArray
 
(BOOL) - isSet
 
(BOOL) - isLibrarySet
 
(BOOL) - isFoundationSet
 
(BOOL) - isFoundationOrderedSet
 
(BOOL) - isDictionary
 
(BOOL) - isLibraryDictionary
 
(BOOL) - isFoundationDictionary
 
(BOOL) - isStack
 
(BOOL) - isQueue
 
(BOOL) - isList
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
- Instance Methods inherited from <SCMutableCollection>
- Instance Methods inherited from <SCCollection>
- Instance Methods inherited from <SCIndexedCollection>
- Instance Methods inherited from <SCMutableIndexedCollection>
- Class Methods inherited from SCCollection
(BOOL) + isCollectionClass:
 
(BOOL) + isLibraryCollectionClass:
 
(BOOL) + isFoundationCollectionClass:
 
(BOOL) + isArrayClass:
 
(BOOL) + isLibraryArrayClass:
 
(BOOL) + isFoundationArrayClass:
 
(BOOL) + isSetClass:
 
(BOOL) + isLibrarySetClass:
 
(BOOL) + isFoundationSetClass:
 
(BOOL) + isOrderedSetClass:
 
(BOOL) + isLibraryOrderedSetClass:
 
(BOOL) + isFoundationOrderedSetClass:
 
(BOOL) + isDictionaryClass:
 
(BOOL) + isLibraryDictionaryClass:
 
(BOOL) + isFoundationDictionaryClass:
 
(BOOL) + isStackClass:
 
(BOOL) + isQueueClass:
 
(BOOL) + isListClass:
 
(BOOL) + isSortableClass:
 
(BOOL) + isCollection:
 
(BOOL) + isLibraryCollection:
 
(BOOL) + isFoundationCollection:
 
(BOOL) + isArray:
 
(BOOL) + isLibraryArray:
 
(BOOL) + isFoundationArray:
 
(BOOL) + isSet:
 
(BOOL) + isLibrarySet:
 
(BOOL) + isFoundationSet:
 
(BOOL) + isOrderedSet:
 
(BOOL) + isLibraryOrderedSet:
 
(BOOL) + isFoundationOrderedSet:
 
(BOOL) + isDictionary:
 
(BOOL) + isLibraryDictionary:
 
(BOOL) + isFoundationDictionary:
 
(BOOL) + isStack:
 
(BOOL) + isQueue:
 
(BOOL) + isList:
 
(BOOL) + isSortable:
 
- Properties inherited from SCCollection
NSString * name
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
SCIndex count
 
BOOL empty
 
NSString * typeName
 
NSString * description
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
- Properties inherited from <SCCollection>
NSString * name
 
SCIndex count
 
BOOL empty
 
NSString * description
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
NSEnumerator * objectEnumerator
 

Detailed Description

Ordered set class.

SDK
macOS 10.7+, iOS 7.0+
Since
version 1.2.0

Implements the ordered object sets.
Class instances can thrown the following exceptions:

Method Documentation

- (SCOrderedSet *) ascendingSortedOrderedSet

Returns an ordered set with objects from the receiving ordered set that are ascending sorted by using the default data sorter.

Returns
An ordered set with the sorted objects
Exceptions
SCCollectionException- collection error detected
- (SCOrderedSet *) ascendingSortedOrderedSetWithSorter: (id<SCSorter>)  sorter

Returns an ordered set with objects from the receiving ordered set that are descending sorted by using the specified data sorter.

Parameters
sorter- the data sorter
Returns
An ordered set with the sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- sortedOrderedSetWithSorter:
- (SCOrderedSet *) descendingSortedOrderedSet

Returns an ordered set with objects from the receiving ordered set that are descending sorted by using the default data sorter.

Returns
An ordered set with the sorted objects
Exceptions
SCCollectionException- collection error detected
- (SCOrderedSet *) descendingSortedOrderedSetWithSorter: (id<SCSorter>)  sorter

Returns an ordered set with objects from the receiving ordered set that are descending sorted by using the specified data sorter.

Parameters
sorter- the data sorter
Returns
An ordered set with the sorted objects
Exceptions
SCCollectionException- collection error detected
- (void) exchangeObjectAtIndex: (SCIndex index
withObjectAtIndex: (SCIndex destination 

Exchanges the object at the specified index with the object at the other index.

Parameters
index- the index of the first object
destination- the index of the second object
Exceptions
SCCollectionException- collection error detected
- (SCIndex) indexOfObject: (id<SCCollectioning>)  object

Returns the index of the specified object.

Parameters
object- the desired object
Returns
The index whose corresponding ordered set object is equal to the desired object.
If none of the objects in the ordered set is equal to the desired object, returns SCNotFound.

Reimplemented from <SCIndexedCollection>.

- (instancetype) init

Initializes a newly allocated ordered set.

Attention
Designed initializer
Returns
An ordered set
- (instancetype) initWithArray: (SCArray *)  array

Initializes a newly allocated ordered set with the objects that are contained in a given array. If the same object appears more than once in array, it is represented only once in the returned ordered set.

Parameters
array- an array of objects to add to the new ordered set
Returns
An initialized ordered set with the contents of array
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithAscendingSortedCollection: (id<SCCollection>)  collection

Initializes a new ordered set with the ascending sorted objects that are contained in a given collection of any supported type. If the same object appears more than once in array, it is represented only onec in the returning ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
Returns
An initialized ordered set with the sorted contents of collection
Exceptions
SCCollectionException- collection error detected
See also
- initWithSortedCollection:
- (instancetype) initWithAscendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Initializes a new ordered set with the ascending sorted objects that are contained in a given collection of any supported type with using the specified data sorter. If the same object appears more than once in array, it is represented only onec in the returning ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
sorter- the data sorter
Returns
An initialized ordered set with the sorted contents of collection
Exceptions
SCCollectionException- collection error detected
See also
- initWithSortedCollection:sorter:
- (instancetype) initWithCollection: (id<SCCollection>)  collection

Initializes a newly allocated ordered set with the objects that a contained in a given collection of any supported type. If the same object appears more than once in array, it is represented only once in the returned ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
Returns
An initialized ordered set with the content of collection

Reimplemented from SCCollection.

- (instancetype) initWithDescendingSortedCollection: (id<SCCollection>)  collection

Initializes a new ordered set with the descending sorted objects that are contained in a given collection of any supported type. If the same object appears more than once in array, it is represented only onec in the returning ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
Returns
An initialized ordered set with the sorted contents of collection
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithDescendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Initializes a new ordered set with the descending sorted objects that are contained in a given collection of any supported type with using the specified data sorter. If the same object appears more than once in array, it is represented only onec in the returning ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
sorter- the data sorter
Returns
An initialized ordered set with the sorted contents of collection
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithName: (NSString *)  name

Initializes a newly allocated ordered set with the specified name.

Parameters
name- the name of the new ordered set
Returns
An initialized ordered set
- (instancetype) initWithObject: (id<SCCollectioning>)  object

Initializes a new ordered set with the object.

Parameters
object- the object to add to the new ordered set
Returns
A new ordered set that contains a single member, the specified object
Exceptions
SCCollectionException- collection erorr detected
- (instancetype) initWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a newly allocated ordered set with members taken from the specified list of objects. If the same object appears more than once in the list, is is represented only once in the returned ordered set.

Parameters
object- the first object to add to the new ordered set
...- a comma-separated list of objects, ending with nil, to add to the new set
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
An initialized ordered set containing objects specified in the parameter list
- (instancetype) initWithOrderedSet: (SCOrderedSet *)  orderedSet

Initializes a new ordered set with the settings and contents of an ordered set.

Attention
Designed initializer
Parameters
orderedSet- a source ordered set
Returns
An initialized ordered set containing references to the objects in the source ordered set
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithSet: (SCSet *)  set

Initializes a new ordered set with the settings and contents of the specified existing set.

Parameters
set- the source set
Returns
An initialized ordered set containing the objects in the source set
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithSortedCollection: (id<SCCollection>)  collection

Initializes a new ordered set with the ascending sorted objects that are contained in a given collection of any supported type. If the same object appears more than once in array, it is represented only onec in the returning ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
Returns
An initialized ordered set with the sorted contents of collection
Exceptions
SCCollectionException- collection error detected
See also
- initWithAscendingSortedCollection:
- (instancetype) initWithSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Initializes a new ordered set with the ascending sorted objects that are contained in a given collection of any supported type with using the specified data sorter. If the same object appears more than once in array, it is represented only onec in the returning ordered set.

Parameters
collection- a collection of objects to add to the new ordered set
sorter- the data sorter
Returns
An initialized ordered set with the sorted contents of collection
Exceptions
SCCollectionException- collection error detected
See also
- initWithAscendingSortedCollection:sorter:
- (void) insertAtIndex: (SCIndex index
objects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Appends the objects from the specified nil terminated list at the specified index of the receiving ordered set, if they are not already a members.

Parameters
index- the index at which the objects should be inserted
object- the first object to insert into the receiving ordered set
...- a comma separated list of objects, ending with nil, to insert into the receiving ordered set
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) insertAtIndexes: (NSIndexSet *)  indexes
objects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Inserts the objects from the specified nil terminated list at the specified indexes.
The count of locations in indexes must equal the count of objects.

Parameters
indexes- the indexes at which the objects should be inserted
object- the first object to insert info the receiving ordered set
...- a comma separated list of objects, ending with nil, to insert into the receiving ordered set
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) insertCollection: (id<SCCollection>)  collection
atIndex: (SCIndex index 

Inserts the objects in the collection of any supported type at the specified index.

Parameters
collection- a collection of objects to insert into the receiving ordered set
index- the index at which the object should be inserted
Exceptions
SCCollectionException- collection error detected
- (void) insertCollection: (id<SCCollection>)  collection
atIndexes: (NSIndexSet *)  indexes 

Inserts the objects in the collection of any supported type at the specified indexes.
The count of locations in indexes must equal the count of objects.

Parameters
collection- a collection of objects to insert into the receiving ordered set
indexes- the indexes at which the objects in collection should be inserted
Exceptions
SCCollectionException- collection error detected
- (void) insertObject: (id<SCCollectioning>)  object
atIndex: (SCIndex index 

Inserts the given object at the specified index of the receiving ordered set, if it is not already a member.

Parameters
object- the object to insert into the receiving ordered set
index- the index in the ordered set at which to insert the specified object
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (void) intersectOrderedSet: (id<SCCollection>)  orderedSet

Removes from the receiving ordered set each object that isn't a member of the specified collection of any supported type.

Parameters
orderedSet- the collection with which to perform the intersection
Exceptions
SCCollectionException- collection error detected
- (void) intersectSet: (id<SCCollection>)  set

Removes from the receiving ordered set each object that isn't a member of the specified set.

Parameters
set- the set with which to perform the intersection
Exceptions
SCCollectionException- collection error detected
- (BOOL) intersectsOrderedSet: (id<SCCollection>)  orderedSet

Returns a boolean value that indicates whether at least one object in the receiving ordered set is also present in another given ordered set.

Parameters
orderedSet- the other ordered set
Returns
YES if at least one object in the receiving ordered set is also present in other ordered set, otherwise NO
Exceptions
SCCollectionException- collection error detected
- (BOOL) intersectsSet: (id<SCCollection>)  set

Returns a boolean value that indicates whether at least one object in the receiving ordered set is also present in the specified set.

Parameters
set- the other set
Returns
YES if at least one object in the receiving ordered set is also present in the specified set, otherwise NO
Exceptions
SCCollectionException- collection error detected
- (BOOL) isEqualToContentsOfOrderedSet: (SCOrderedSet *)  orderedSet

Compares the receiving ordered set to another ordered set.

Parameters
orderedSet- the ordered set with which to compare the receiving ordered set
Returns
YES if the contents of other ordered set are equal to the contents of the receiving ordered set, otherwise NO
See also
- isEqualToOrderedSet:
- (BOOL) isEqualToOrderedSet: (id<SCCollection>)  orderedSet

Compares the receiving ordered set to another ordered set.

Parameters
orderedSet- the ordered set with which to compare the receiving ordered set
Returns
YES if the settings and contents of other ordered set are equal to the settings and contents of the receiving ordered set, otherwise NO
See also
- isEqualToContentsOfOrderedSet:
- (BOOL) isSubsetOfOrderedSet: (id<SCCollection>)  orderedSet

Returns a boolean value that indicates whether every object in the receiving ordered set is also present in another given ordered set.

Parameters
orderedSet- the ordered set with which to compare the receiving ordered set
Returns
YES if every object in the receiving ordered set is also present in a given ordered set, otherwise NO
Exceptions
SCCollectionException- collection error detected
- (BOOL) isSubsetOfSet: (id<SCCollection>)  set

Returns a boolean value that indicates whether every object in the receiving ordered set is also present in another given set.

Parameters
set- the set with which to compare the receiving ordered set
Returns
YES if every object in the receiving ordered set is also present in the set, otherwise NO
Exceptions
SCCollectionException- collection error detected
- (void) minusOrderedSet: (id<SCCollection>)  orderedSet

Removes each object in the specified collection of any supported type from the receiving ordered set, if present.

Parameters
orderedSet- the collection of objects to remove from the receiving ordered set
Exceptions
SCCollectionException- collection error detected
- (void) minusSet: (id<SCCollection>)  set

Removes each object in the specified set from the receiving ordered set, if present.

Parameters
set- the set of objects to remove from the receiving ordered set
Exceptions
SCCollectionException- collection error detected
- (void) moveObjectAtIndex: (SCIndex index
toIndex: (SCIndex destination 

Moves the object at the specified index to the new location.

Parameters
index- the index of the object to move
destination- the index in the receiving ordered set at which to insert the object
Exceptions
SCCollectionException- collection error detected
- (id) objectAtIndex: (SCIndex index

Returns the object at the specified index of the ordered set.

Parameters
index- the index within the bounds of the ordered set
Returns
The object located at the specified index
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCIndexedCollection>.

- (SCArray *) objectsAtIndexes: (NSIndexSet *)  indexes

Returns the objects in the ordered set at the specified indexes.

Parameters
indexes- the indexes
Returns
The array with the required objects
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSet

Creates and returns an empty unnamed ordered set.

Returns
A new ordered set

Reimplemented from SCCollection.

+ (instancetype) orderedSetWithArray: (SCArray *)  array

Creates and returns an ordered set containing a unique collection of objects contained in a given array. If the same object appears more than once in array, it is added only once to the returned ordered set.

Parameters
array- an array containing the objects to add to the new ordered set
Returns
A new ordered set containing a uniqued collection of the objects contained in array
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithAscendingSortedCollection: (id<SCCollection>)  collection

Creates and returns an ordered set containing the ascending sorted objects from the specified collection of any supported type. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
Returns
A new ordered set containing the sorted objects from the source collection
Exceptions
SCCollectionException- collection error detected
See also
+ orderedSetWithSortedCollection:
+ (instancetype) orderedSetWithAscendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Creates and returns an ordered set containing the ascending sorted objects from the specified collection of any supported type with using the specified data sorter. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
sorter- the data sorter
Returns
A new ordered set containing the sorted objects from the source collection
Exceptions
SCCollectionException- collection error detected
See also
+ orderedSetWithSortedCollection:sorter:
+ (instancetype) orderedSetWithCoder: (NSCoder *)  coder

Returns an ordered set created by using the specified coder.

Parameters
coder- the source coder
Returns
A created ordered set
+ (instancetype) orderedSetWithCollection: (id<SCCollection>)  collection

Creates and returns an ordered set containing a unique collection of objects contained in a given collection of any supported type. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
Returns
A new ordered set containing a unique collection of the objects contained in collection
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithContentsOfSerializedFile: (NSString *)  path

Returns an ordered set created by using the content of a serialized file with the specified path.

Parameters
path- the path to the source serialized file
Returns
A created ordered set
+ (instancetype) orderedSetWithDataDictionary: (NSDictionary *)  dictionary

Returns an ordered set created by using the specified data dictionary.

Parameters
dictionary- the soource data dictionary
Returns
A created ordered set
+ (instancetype) orderedSetWithDataDictionaryFromFile: (NSString *)  path

Returns an ordered set created by using a data dictionary from the specified file.

Parameters
path- the path of the source data dictionary file
Returns
A created ordered set
+ (instancetype) orderedSetWithDescendingSortedCollection: (id<SCCollection>)  collection

Creates and returns an ordered set containing the descending sorted objects from the specified collection of any supported type. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
Returns
A new ordered set containing the sorted objects from the source collection
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithDescendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Creates and returns an ordered set containing the descending sorted objects from the specified collection of any supported type with using the specified data sorter. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
sorter- the data sorter
Returns
A new ordered set containing the sorted objects from the source collection
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithFileStream: (NSString *)  path

Returns an ordered set created by using a data from a file stream with the specified path.

Parameters
path- the path of the source file stream
Returns
A created ordered set
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) orderedSetWithName: (NSString *)  name

Returns an empty ordered set created by using the specified set name.

Parameters
name- the name of the ordered set
Returns
A created ordered set
+ (instancetype) orderedSetWithObject: (id<SCCollectioning>)  object

Creates and returns an ordered set that contains a single given object.

Parameters
object- the object to add to the new ordered set
Returns
A new ordered set containing the specified object
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Creates and returns an ordered set containing the objects in a given argument list. If the same object appears more than once in list, it is added only once to the returned ordered set. The objects are added to the ordered set in the order that they are listed.

Parameters
object- the first object to the new ordered set
...- a comma separated list of objects, ending with nil, to add to the new set
NS_REQUIRES_NIL_TERMINATION- a mandatory nil pointer
Returns
A new ordered set containing a unique collection of the objects contained in list
+ (instancetype) orderedSetWithOrderedSet: (SCOrderedSet *)  orderedSet

Creates and returns an ordered set containing the settings and objects from the another ordered set.

Parameters
orderedSet- an existing ordered set containing the settings and objects to add to the new ordered set
Returns
A new ordered set containing the objects from the source ordered set
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithSet: (SCSet *)  set

Creates and returns an ordered set with the settings and contents of a given set.

Parameters
set- a source set
Returns
A new ordered set containing objects from the source set
Exceptions
SCCollectionException- collection error detected
+ (instancetype) orderedSetWithSortedCollection: (id<SCCollection>)  collection

Creates and returns an ordered set containing the ascending sorted objects from the specified collection of any supported type. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
Returns
A new ordered set containing the sorted objects from the source collection
Exceptions
SCCollectionException- collection error detected
See also
+ orderedSetWithAscendingSortedCollection:
+ (instancetype) orderedSetWithSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Creates and returns an ordered set containing the ascending sorted objects from the specified collection of any supported type with using the specified data sorter. If the same object appears more than once in collection, it is added only once to the returned ordered set.

Parameters
collection- a collection containing the objects to add to the new ordered set
sorter- the data sorter
Returns
A new ordered set containing the sorted objects from the source collection
Exceptions
SCCollectionException- collection error detected
See also
+ orderedSetWithAscendingSortedCollection:sorter:
+ (instancetype) orderedSetWithStream: (SCStream *)  stream

Returns an ordered set created by using a data from the specified stream.

Parameters
stream- the source stream
Returns
A created ordered set
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
- (void) removeFirstObject

Removes from the receiving ordered set the first object.

Exceptions
SCCollectionException- collection error detected
- (void) removeLastObject

Removes from the receiving ordered set the last object.

Exceptions
SCCollectionException- collection error detected
- (void) removeObjectAtIndex: (SCIndex index

Removes the object at the specified index from the receiving ordered set.

Parameters
index- the index of the object to remove from the receiving ordered set
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (void) removeObjectsAtIndexes: (NSIndexSet *)  indexes

Removes the objects at the specified indexes from the receiving ordered set.

Parameters
indexes- the indexes of objects to remove from the receiving ordered set
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (void) removeObjectsInRange: (NSRange)  range

Removes from the receiving ordered set each of objects within a given range.

Parameters
range- the range of objects to remove from the receiving ordered set
Exceptions
SCCollectionException- collection error detected
- (void) replaceObjectAtIndex: (SCIndex index
withObject: (id<SCCollectioning>)  object 

Replaces the object at the specified index with the new object.

Parameters
index- the index of object to be replaced
object- the object with which to replace the object at the specified index
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (void) replaceObjectsAtIndexes: (NSIndexSet *)  indexes
withCollection: (id<SCCollection>)  collection 

Replaces the objects at the specified indexes with the new objects from the given collection of any supported type.
The count of indexes must equal the count of objects.

Parameters
indexes- the indexes of the objects to be replaced
collection- the collection of objects with which to replace objects in the receiving ordered set
Exceptions
SCCollectionException- collection error detected
- (void) replaceObjectsAtIndexes: (NSIndexSet *)  indexes
withObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Replaces the objects at the specified indexes with the new objects from the specified a comma separated list.

Parameters
indexes- the indexes of the objects to be replaced
object- the first object with which to replace the objects
...- a comma separated list of objects, ending with nil, to replace the objects
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) replaceObjectsInRange: (NSRange)  range
withCollection: (id<SCCollection>)  collection 

Replaces the objects in the receiving ordered set at the range with the new objects from the specified collection of any supported type.

Parameters
range- the range of the objects to replace
collection- a collection of objects
Exceptions
SCCollectionException- collection error detected
- (void) replaceObjectsInRange: (NSRange)  range
withObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Replaces the objects in the receiving ordered set at the range with the new objects from a comma separated list.

Parameters
range- the range of the objects to replace
object- the first object with which to replace the objects
...- a comma separated list of objects, ending with nil, to replace the objects
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) reverse

Reverses the order of all objects in the receiving ordered set.

Exceptions
SCCollectionException- collection error detected
- (void) setAscendingSortedCollection: (id<SCCollection>)  collection

Replaces the settings and contents of the receiving ordered set by using the settings and ascending sorted contents from the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Exceptions
SCCollectionException- collection error detected
See also
- setSortedCollection:
- (void) setAscendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Replaces the settings and contents of the receiving ordered set by using the settings and ascending sorted contents from the specified existing collection of any supported type with using the specified data sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
See also
- setSortedCollection:sorter:
- (void) setDescendingSortedCollection: (id<SCCollection>)  collection

Replaces the settings and contents of the receiving ordered set by using the settings and descending sorted contents from the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Exceptions
SCCollectionException- collection error detected
- (void) setDescendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Replaces the settings and contents of the receiving ordered set by using the settings and descending sorted contents from the specified existing collection of any supported type with using the specified data sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
- (void) setObject: (id<SCCollectioning>)  object
atIndex: (SCIndex index 

Appends or replaces the object at the specified index. If the specified index is equals to the length of the ordered set, then it inserts the object at the index, otherwise it replaces the object at that index with the given object.

Parameters
object- the object to insert or append
index- the index
Exceptions
SCCollectionException- collection error detected
- (void) setOrderedSet: (SCOrderedSet *)  orderedSet

Replaces the settings and contents of the receiving ordered set by using the settings and contents from the specified existing ordered set.

Parameters
orderedSet- the existing source ordered set
Exceptions
SCCollectionException- collection error detected
- (void) setSet: (SCSet *)  set

Replaces the settings and contents of the receiving ordered set by using the settings and contents from the specified existing set.

Parameters
set- the existing source set
Exceptions
SCCollectionException- collection error detected
- (void) setSortedCollection: (id<SCCollection>)  collection

Replaces the settings and contents of the receiving ordered set by using the settings and ascending sorted contents from the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Exceptions
SCCollectionException- collection error detected
See also
- setAscendingSortedCollection:
- (void) setSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Replaces the settings and contents of the receiving ordered set by using the settings and ascending sorted contents from the specified existing collection of any supported type with using the specified data sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
See also
- setAscendingSortedCollection:sorter:
- (void) sort

Sorts ascending the content of the receiving array using the default data sorter.

Exceptions
SCCollectionException- collection error detected
See also
- sortAscending
- (void) sortAscending

Sorts ascending the content of the receiving array using the default data sorter.

Exceptions
SCCollectionException- collection error detected
See also
- sort
- (void) sortAscendingWithSorter: (id<SCSorter>)  sorter

Sorts ascending the receiving ordered set using the specified data sorter.

Parameters
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
See also
- sortWithSorter:
- (void) sortDescending

Sorts descending the content of the receving array using the default data sorter.

Exceptions
SCCollectionException- collection error detected
- (void) sortDescendingWithSorter: (id<SCSorter>)  sorter

Sorts descending the receiving ordered set using the specified data sorter.

Parameters
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
- (SCOrderedSet *) sortedOrderedSetWithSorter: (id<SCSorter>)  sorter

Returns an ordered set with objects from the receiving ordered set that are ascending sorted by using the specified data sorter.

Parameters
sorter- the data sorter
Returns
An ordered set with the sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- ascendingSortedOrderedSetWithSorter:
- (void) sortWithSorter: (id<SCSorter>)  sorter

Sorts ascending the receiving ordered set using the specified data sorter.

Parameters
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
See also
- sortAscendingWithSorter:
- (void) unionOrderedSet: (id<SCCollection>)  orderedSet

Adds each object in the specified collection of any supported type to the receiving ordered set, if not present.

Parameters
orderedSet- the collection of objects to add to the receiving ordered set
Exceptions
SCCollectionException- collection error detected
- (void) unionSet: (id<SCCollection>)  set

Adds each object in the specified set to the receiving ordered set, if not present.

Parameters
set- the set of objects to add to the receiving ordered set
Exceptions
SCCollectionException- collection error detected

Property Documentation

- (SCArray *) allObjects
readnonatomicretain

An array containing the members of the ordered set, or an empty array if the ordered set has no members

- (id) firstObject
readnonatomicretain

First object in the ordered set

- (SCIndex) indexOfLastObject
readnonatomicassign

Index of the ordered set last object

- (id) lastObject
readnonatomicretain

Last object in the ordered set

- (SCOrderedSet *) reversedOrderedSet
readnonatomicretain

Ordered set with objects in reverse order

- (SCOrderedSet *) sortedOrderedSet
readnonatomicassign

Ordered set with ascending sorted objects


The documentation for this class was generated from the following files: