Samond Classes Library 1.2.6-STABLE build 219
List of all members
SCOrderedSet Class Reference

Ordered set class. More...

#import <SCOrderedSet.h>

+ Inheritance diagram for SCOrderedSet:

Creating Ordered Sets

(instancetype) + orderedSetWithCoder:
 
(instancetype) + orderedSetWithContentsOfSerializedFile:
 
(instancetype) + orderedSetWithDataDictionary:
 
(instancetype) + orderedSetWithDataDictionaryFromFile:
 
(instancetype) + orderedSetWithStream:
 
(instancetype) + orderedSetWithFileStream:
 
(instancetype) + orderedSetWithData:
 
(instancetype) + orderedSetWithContentsOfFile:
 
(instancetype) + orderedSetWithContentsOfURL:
 
(instancetype) + orderedSetWithContentsOfURLString:
 
(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) - setArray:
 
(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) - isEqualToSet:
 
(BOOL) - isEqualToArray:
 

Deriving New Ordered Sets

(SCOrderedSet *) - orderedSetByAddingObject:
 
(SCOrderedSet *) - orderedSetByAddingObjects:
 
(SCOrderedSet *) - orderedSetByAddingCollection:
 
(SCOrderedSet *) - orderedSetByAddingObjectsFromArray:
 
(SCOrderedSet *) - orderedSetByAddingArray:
 
(SCOrderedSet *) - orderedSetByAddingObjectsFromSet:
 
(SCOrderedSet *) - orderedSetByAddingSet:
 
(SCOrderedSet *) - orderedSetByAddingObjectsFromOrderedSet:
 
(SCOrderedSet *) - orderedSetByAddingOrderedSet:
 

Sorting Ordered Sets

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

Adding Objects

(void) - insertObject:atIndex:
 
(void) - insertAtIndex:objects:
 
(void) - insertCollection:atIndex:
 
(void) - insertAtIndexes:objects:
 
(void) - insertCollection:atIndexes:
 
(void) - setObject:atIndex:
 
(void) - addObjectsFromArray:
 
(void) - addArray:
 
(void) - addObjectsFromSet:
 
(void) - addSet:
 
(void) - addObjectsFromOrderedSet:
 
(void) - addOrderedSet:
 

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:
 
(void) - setObject:atIndexedSubscript:
 

Moving Objects

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

Querying an Ordered Set

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

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:
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(instancetype) - initWithData:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- 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
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
NSString * typeName
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
SCCollectionType collectionType
 
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 SCObject
NSString * className
 
- Properties inherited from <SCCollection>
NSString * name
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
SCCollectionType collectionType
 
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 <SCIndexedCollection>
id firstObject
 
id lastObject
 
SCIndex indexOfLastObject
 

Detailed Description

Ordered set class.

SDK
macOS 10.7+, iOS 7.0+, GNUstep
Since
version 1.2.0

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

Method Documentation

- (void) addArray: (SCArray *)  array

Adds into the receiving ordered set the objects from the specified array.

Parameters
array- the array with object to add into the receiving ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromArray:
- (void) addObjectsFromArray: (SCArray *)  array

Adds into the receiving ordered set the objects from the specified array.

Parameters
array- the array with object to add into the receiving ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addArray:
- (void) addObjectsFromOrderedSet: (SCOrderedSet *)  orderedSet

Adds into the receiving ordered set the objects from the specified ordered set.

Parameters
orderedSet- the ordered set with object to add into the receiving ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addOrderedSet:
- (void) addObjectsFromSet: (SCSet *)  set

Adds into the receiving ordered set the objects from the specified set.

Parameters
set- the set with object to add into the receiving ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addSet:
- (void) addOrderedSet: (SCOrderedSet *)  orderedSet

Adds into the receiving ordered set the objects from the specified ordered set.

Parameters
orderedSet- the ordered set with object to add into the receiving ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromOrderedSet:
- (void) addSet: (SCSet *)  set

Adds into the receiving ordered set the objects from the specified set.

Parameters
set- the set with object to add into the receiving ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromSet:
- (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 *) 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

Reimplemented from SCCollection.

- (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.
Designed initializer

Parameters
name- the name of the new ordered set
Returns
An initialized ordered set

Reimplemented from SCCollection.

- (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) isEqualToArray: (SCArray *)  array

Compares the receiving ordered set to the specified array.

Parameters
array- the array with which to compare the receiving ordered set
Returns
YES if the contents of the specified array are equal to the contents of the receiving ordered set, otherwise NO
- (BOOL) isEqualToOrderedSet: (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
- (BOOL) isEqualToSet: (SCSet *)  set

Compares the receiving ordered set to the specified set.

Parameters
set- the set with which to compare the receiving ordered set
Returns
YES if the contents of the specified set are equal to the contents of the receiving ordered set, otherwise NO
- (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>.

- (id) objectAtIndexedSubscript: (SCIndex index

Returns the object at the specified index.

Parameters
index- the index within the bounds of the ordered set
Returns
The object located at a given index
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.5

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
- (SCOrderedSet *) orderedSetByAddingArray: (SCArray *)  array

Returns the new ordered set formed by adding the objects in a given array to the receiving ordered set.

Parameters
array- the array of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- orderedSetByAddingObjectsFromArray:
- (SCOrderedSet *) orderedSetByAddingCollection: (id<SCCollection>)  collection

Returns the new ordered set formed by adding the objects in a given collection of any supported type to the receiving ordered set.

Parameters
collection- the collection of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given collection
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCOrderedSet *) orderedSetByAddingObject: (id<SCCollectioning>)  object

Creates and returns a new ordered set with objects from the receiving ordered set and a given object.

Parameters
object- the object to add into the new ordered set
Returns
A new ordered set with objects from the receiving ordered set and a given object
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCOrderedSet *) orderedSetByAddingObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Creates and returns a new ordered set with objects from the receiving ordered set and objects from a given list.

Parameters
object- the first object to add into the new ordered set
...- a comma-separated list of additional objects, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A new ordered set with objects from the receiving ordered set and a given list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCOrderedSet *) orderedSetByAddingObjectsFromArray: (SCArray *)  array

Returns the new ordered set formed by adding the objects in a given array to the receiving ordered set.

Parameters
array- the array of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- orderedSetByAddingArray:
- (SCOrderedSet *) orderedSetByAddingObjectsFromOrderedSet: (SCOrderedSet *)  orderedSet

Returns the new ordered set formed by adding the objects in a given ordered set to the receiving ordered set.

Parameters
orderedSet- the ordered set of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- orderedSetByAddingOrderedSet:
- (SCOrderedSet *) orderedSetByAddingObjectsFromSet: (SCSet *)  set

Returns the new ordered set formed by adding the objects in a given set to the receiving ordered set.

Parameters
set- the set of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- orderedSetByAddingSet:
- (SCOrderedSet *) orderedSetByAddingOrderedSet: (SCOrderedSet *)  orderedSet

Returns the new ordered set formed by adding the objects in a given ordered set to the receiving ordered set.

Parameters
orderedSet- the ordered set of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given ordered set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- orderedSetByAddingObjectsFromOrderedSet:
- (SCOrderedSet *) orderedSetByAddingSet: (SCSet *)  set

Returns the new ordered set formed by adding the objects in a given set to the receiving ordered set.

Parameters
set- the set of objects to add to the ordered set
Returns
A new ordered set that contains objects from receiving ordered set and a given set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- orderedSetByAddingObjectsFromSet:
+ (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) orderedSetWithContentsOfFile: (NSString *)  path

Returns an ordered set created by using the file with the specified path.

Parameters
path- the path to the source file
Returns
A created ordered set
+ (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) orderedSetWithContentsOfURL: (NSURL *)  url

Returns an ordered set created by using the specified URL.

Parameters
url- the source URL
Returns
A created ordered set
+ (instancetype) orderedSetWithContentsOfURLString: (NSString *)  urlString

Returns an ordered set created by using the data from the URL with the specified string.

Parameters
urlString- the string of the source URL
Returns
A created ordered set
+ (instancetype) orderedSetWithData: (NSData *)  data

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

Parameters
data- the source data object
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) setArray: (SCArray *)  array

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

Parameters
array- the existing array
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) setObject: (id<SCCollectioning>)  object
atIndexedSubscript: (SCIndex index 

Replaces the object at the specified index with the new object, possibly adding the object.

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

Reimplemented from <SCMutableIndexedCollection>.

- (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
readnonatomicassign

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

- (SCOrderedSet *) ascendingSortedOrderedSet
readnonatomicassign

An ordered set with ascending sorted objects

See also
sortedOrderedSet
- (SCOrderedSet *) descendingSortedOrderedSet
readnonatomicassign

An ordered set with descending sorted objects

- (id) firstObject
readnonatomicassign

First object in the ordered set

- (SCIndex) indexOfLastObject
readnonatomicassign

Index of the ordered set last object

- (id) lastObject
readnonatomicassign

Last object in the ordered set

- (SCOrderedSet *) reversedOrderedSet
readnonatomicassign

Ordered set with objects in reverse order

- (SCOrderedSet *) sortedOrderedSet
readnonatomicassign

An ordered set with ascending sorted objects

See also
ascendingSortedOrderedSet

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