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

Array class. More...

#import <SCArray.h>

+ Inheritance diagram for SCArray:

Creating Arrays

(instancetype) + arrayWithCoder:
 
(instancetype) + arrayWithContentsOfSerializedFile:
 
(instancetype) + arrayWithDataDictionary:
 
(instancetype) + arrayWithDataDictionaryFromFile:
 
(instancetype) + arrayWithStream:
 
(instancetype) + arrayWithFileStream:
 
(instancetype) + arrayWithData:
 
(instancetype) + arrayWithContentsOfFile:
 
(instancetype) + arrayWithContentsOfURL:
 
(instancetype) + arrayWithContentsOfURLString:
 
(instancetype) + arrayWithName:
 
(instancetype) + arrayWithObject:
 
(instancetype) + arrayWithObjects:
 
(instancetype) + arrayWithCollection:
 
(instancetype) + arrayWithArray:
 
(instancetype) + array
 
(instancetype) + arrayWithAscendingSortedCollection:sorter:
 
(instancetype) + arrayWithDescendingSortedCollection:sorter:
 
(instancetype) + arrayWithSortedCollection:sorter:
 
(instancetype) + arrayWithAscendingSortedCollection:
 
(instancetype) + arrayWithDescendingSortedCollection:
 
(instancetype) + arrayWithSortedCollection:
 

Initializing Arrays

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

Copying Arrays

(void) - setArray:
 
(void) - setAscendingSortedCollection:sorter:
 
(void) - setDescendingSortedCollection:sorter:
 
(void) - setSortedCollection:sorter:
 
(void) - setAscendingSortedCollection:
 
(void) - setDescendingSortedCollection:
 
(void) - setSortedCollection:
 

Comparing Arrays

(BOOL) - isEqualToArray:
 

Deriving New Arrays

(SCArray *) - arrayByAddingObject:
 
(SCArray *) - arrayByAddingObjects:
 
(SCArray *) - arrayByAddingCollection:
 
(SCArray *) - arrayByAddingObjectsFromArray:
 
(SCArray *) - arrayByAddingArray:
 
(SCArray *) - subarrayWithRange:
 

Sorting Arrays

SCArrayascendingSortedArray
 
SCArraydescendingSortedArray
 
SCArraysortedArray
 
(void) - sortAscendingWithSorter:
 
(void) - sortDescendingWithSorter:
 
(void) - sortWithSorter:
 
(void) - sortAscending
 
(void) - sortDescending
 
(void) - sort
 
(SCArray *) - ascendingSortedArrayWithSorter:
 
(SCArray *) - descendingSortedArrayWithSorter:
 
(SCArray *) - sortedArrayWithSorter:
 

Adding Objects

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

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:
 

Copying and Moving Objects

SCArrayreversedArray
 
(void) - exchangeObjectAtIndex:withObjectAtIndex:
 
(void) - duplicateObjectAtIndex:
 
(void) - duplicateObjectsInRange:
 
(void) - duplicateAllObjects
 
(void) - duplicate
 
(void) - copyObjectAtIndex:toIndex:
 
(void) - copyObjectsInRange:toIndex:
 
(void) - moveObjectAtIndex:toIndex:
 
(void) - moveObjectsInRange:toIndex:
 
(void) - reverse
 

Querying an Array

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

Finding Objects in an Array

SCIndex indexOfLastObject
 
(SCIndex- indexOfObject:
 
(SCIndex- indexOfObject:inRange:
 

Additional Inherited Members

- Instance Methods inherited from SCCollection
(void) - enumerateWithDelegate:
 
(void) - enumerate
 
(void) - reverseEnumerateWithDelegate:
 
(void) - reverseEnumerate
 
(void) - setCollection:
 
(void) - setObject:
 
(void) - setObjects:
 
(BOOL) - isEqualToCollection:
 
(BOOL) - isEqual:
 
(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

Array class.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.1.3

Implements the array, which is a collection with the indexed access to the objects.
Class instances can thrown the following exceptions:

Method Documentation

- (void) addArray: (SCArray *)  array

Adds the objects contained in another given array to the end of receiving array content.

Parameters
array- an array of objects to add to the end of receiving array content
Exceptions
SCCollectionException- collection error detected
Version
1.2.3
See also
- addObjectsFromArray:
- (void) addObjectsFromArray: (SCArray *)  array

Adds the objects contained in another given array to the end of receiving array content.

Parameters
array- an array of objects to add to the end of receiving array content
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addArray:
+ (instancetype) array

Returns an empty unnamed array created by using the default settings.

Returns
A created array
- (SCArray *) arrayByAddingArray: (SCArray *)  array

Returns a new array that is a copy of the receiving array with the objects contained in another array added to the end.

Parameters
array- the array with added objects
Returns
A new array with objects from the receiving array and objects from a given another array.
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- arrayByAddingObjectsFromArray:
- (SCArray *) arrayByAddingCollection: (id<SCCollection>)  collection

Returns a new array that is a copy of the receiving array with the objects contained in the specified collection added to the end.

Parameters
collection- the collection with added objects
Returns
A new array with objects from the receiving array and objects from a given collection
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCArray *) arrayByAddingObject: (id<SCCollectioning>)  object

Returns a new array that is a copy of the receiving array with a given object added to the end.

Parameters
object- the added object
Returns
An array with objects from the reciving array and with a specified object
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCArray *) arrayByAddingObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Returns a new array that is a copy of the receiving array with the objects from the specified list added to the end.

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

Returns a new array that is a copy of the receiving array with the objects contained in another array added to the end.

Parameters
array- the array with added objects
Returns
A new array with objects from the receiving array and objects from a given another array.
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- arrayByAddingArray:
+ (instancetype) arrayWithArray: (SCArray *)  array

Returns an array created by using the specified existing array.

Parameters
array- the existing source array
Returns
A created array
Exceptions
SCCollectionException- collection error detected
+ (instancetype) arrayWithAscendingSortedCollection: (id<SCCollection>)  collection

Returns an ascending sorted array created by using the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Returns
A created array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
+ arrayWithSortedCollection:
+ (instancetype) arrayWithAscendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Returns an ascending sorted array created by using the specified existing collection of any supported type and a given data sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Returns
A created array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
+ arrayWithSortedCollection:sorter:
+ (instancetype) arrayWithCoder: (NSCoder *)  coder

Returns an array created by using the specified coder.

Parameters
coder- the source coder
Returns
A created array
+ (instancetype) arrayWithCollection: (id<SCCollection>)  collection

Returns an array created by using the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Returns
A created array
Exceptions
SCCollectionException- collection error detected
+ (instancetype) arrayWithContentsOfFile: (NSString *)  path

Returns an array created by using the file with the specified path.

Parameters
path- the path to the source file
Returns
A created array
+ (instancetype) arrayWithContentsOfSerializedFile: (NSString *)  path

Returns an array created by using the content of serialized file with the specified path.

Parameters
path- the source serialized file path
Returns
A created array
+ (instancetype) arrayWithContentsOfURL: (NSURL *)  url

Returns an array created by using the specified URL.

Parameters
url- the source URL
Returns
A created array
+ (instancetype) arrayWithContentsOfURLString: (NSString *)  urlString

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

Parameters
urlString- the string of the source URL
Returns
A created array
+ (instancetype) arrayWithData: (NSData *)  data

Returns an array created by using the specified data object.

Parameters
data- the source data object
Returns
A created array
+ (instancetype) arrayWithDataDictionary: (NSDictionary *)  dictionary

Returns an array created by using the specified data dictionary.

Parameters
dictionary- the source data dictionary
Returns
A created array
+ (instancetype) arrayWithDataDictionaryFromFile: (NSString *)  path

Returns an array created by using the data dictionary from the specified file.

Parameters
path- the source data dictionary file path
Returns
A created array
+ (instancetype) arrayWithDescendingSortedCollection: (id<SCCollection>)  collection

Returns a descending sorted array created by using the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Returns
A created array with the descending sorted objects
Exceptions
SCCollectionException- collection error detected
+ (instancetype) arrayWithDescendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Returns a descending sorted array created by using the specified existing collection of any supported type and a given data sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Returns
A created array with the descending sorted objects
Exceptions
SCCollectionException- collection error detected
+ (instancetype) arrayWithFileStream: (NSString *)  path

Returns an array created by using the data from the file stream with the specified path.

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

Returns an empty array created by using the specified array name.

Parameters
name- the array name
Returns
A created array
+ (instancetype) arrayWithObject: (id<SCCollectioning>)  object

Returns an array created by using the specified existing object.

Parameters
object- the existing source object
Returns
A created array
Exceptions
SCCollectionException- collection error detected
+ (instancetype) arrayWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Returns an array created by using objects from the specified nil terminated list.

Parameters
object- the first object
...- the other objects
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A created array
+ (instancetype) arrayWithSortedCollection: (id<SCCollection>)  collection

Returns an ascending sorted array created by using the specified existing collection of any supported type.

Parameters
collection-the existing source collection
Returns
A created array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
+ arrayWithAscendingSortedCollection:
+ (instancetype) arrayWithSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Returns an ascending sorted array created by using the specified existing collection of any supported type and a given data sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Returns
A created array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
+ arrayWithAscendingSortedCollection:sorter:
+ (instancetype) arrayWithStream: (SCStream *)  stream

Returns an array created by using the data from the specified stream.

Parameters
stream- the source stream
Returns
A created array
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
- (SCArray *) ascendingSortedArrayWithSorter: (id<SCSorter>)  sorter

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

Parameters
sorter- the data sorter
Returns
An array with sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- sortedArrayWithSorter:
- (void) copyObjectAtIndex: (SCIndex index
toIndex: (SCIndex destination 

Copies the object at the specified source index to a given destination index.

Parameters
index- the source index of the object to be copied
destination- the destination index
Exceptions
SCCollectionException- collection error detected
- (void) copyObjectsInRange: (NSRange)  range
toIndex: (SCIndex destination 

Copies the objects in the specified range to a given destination index.

Parameters
range- the range of the objects to be copied
destination- the destination index
Exceptions
SCCollectionException- collection error detected
- (SCArray *) descendingSortedArrayWithSorter: (id<SCSorter>)  sorter

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

Parameters
sorter- the data sorter
Returns
An array with sorted objects
Exceptions
SCCollectionException- collection error detected
- (void) duplicate

Duplicates the content of the receiving array.

Exceptions
SCCollectionException- collection error detected
- (void) duplicateAllObjects

Duplicates the all objects within the receiving array.

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

Duplicates the object at the specified index.

Parameters
index- the index of the object to be duplicate
Exceptions
SCCollectionException- collection error detected
- (void) duplicateObjectsInRange: (NSRange)  range

Duplicates the objects within the specified range.

Parameters
range- the range of the objects to be duplicate
Exceptions
SCCollectionException- collection error detected
- (void) exchangeObjectAtIndex: (SCIndex index
withObjectAtIndex: (SCIndex destination 

Exchanges the objects in the receiving array at given indexes.

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 lowest index whose corresponding receiving array object is equal to a given object.

Parameters
object- еру desired object
Returns
Lowest index of object that equals to the specified object, otherwise SCNotFound

Reimplemented from <SCIndexedCollection>.

- (SCIndex) indexOfObject: (id<SCCollectioning>)  object
inRange: (NSRange)  range 

Returns the lowest index within a specified range whose corresponding receiving array object is equal to a given object.

Parameters
object- the desired object
range- the range of indexes in the array within which to search for the specified object
Returns
Lowest index within range of the object that equals to the specified object, otherwise NO
Exceptions
SCCollectionException- collection error detected
- (instancetype) init

Initializes an empty unnamed array using the default settings.

Returns
A newly initialized array

Reimplemented from SCCollection.

- (instancetype) initWithArray: (SCArray *)  array

Initializes an array using the specified existing array.

Attention
Designed initializer
Parameters
array- the existing source array
Returns
A newly initialized array
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithAscendingSortedCollection: (id<SCCollection>)  collection

Initializes an array using the ascending sorted content from the specified existing collection.

Parameters
collection- the existing source collection
Returns
A newly initialized array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- initWithSortedCollection:
- (instancetype) initWithAscendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Initializes an array using the ascending sorted content from the specified existing collection and a given sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Returns
A newly initialized array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- initWithSortedCollection:sorter:
- (instancetype) initWithCollection: (id<SCCollection>)  collection

Initializes an array using the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Returns
A newly initialized array
Exceptions
SCCollectionException- collection error detected

Reimplemented from SCCollection.

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

Initializes an array using the descending sorted content from the specified existing collection.

Parameters
collection- the existing source collection
Returns
A newly initialized array with the descending sorted objects
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithDescendingSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Initializes an array using the descending sorted content from the specified existing collection and a given sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Returns
A newly initialized array with the descending sorted objects
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithName: (NSString *)  name

Initializes an empty array using the specified array name.
Designed initializer

Parameters
name- the array name
Returns
A newly initialized array

Reimplemented from SCCollection.

- (instancetype) initWithObject: (id<SCCollectioning>)  object

Initializes an array using the specified existing object.

Parameters
object- the existing source object
Returns
A newly initialized array
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Initializes an array using the existing objects from the specified nil terminated list.

Parameters
object- the first source object
...- the other source objects
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A newly initialized array
- (instancetype) initWithSortedCollection: (id<SCCollection>)  collection

Initializes an array using the ascending sorted content from the specified existing collection.

Parameters
collection- the existing source collection
Returns
A newly initialized array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- initWithAscendingSortedCollection:
- (instancetype) initWithSortedCollection: (id<SCCollection>)  collection
sorter: (id<SCSorter>)  sorter 

Initializes an array using the ascending sorted content from the specified existing collection and a given sorter.

Parameters
collection- the existing source collection
sorter- the data sorter
Returns
A newly initialized array with the ascending sorted objects
Exceptions
SCCollectionException- collection error detected
See also
- initWithAscendingSortedCollection:sorter:
- (void) insertAtIndex: (SCIndex index
objects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Inserts the objects from the specified nil terminated list into the receiving array at a given index.

Parameters
index- the index at which to insert objects
object- the first inserting object
...- the other inserting objects
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 into the receiving array at a given indexes.

Parameters
indexes- the indexes at which the objects should be inserted
object- the first object to insert into the receiving array
...- the other inserting objects
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) insertCollection: (id<SCCollection>)  collection
atIndex: (SCIndex index 

Inserts the objects from the specified collection of any supported type into the receiving array at a given index.

Parameters
collection- the collection of objects to insert into the receiving array at the specified index
index- the index at which to insert objects from the specified collection
Exceptions
SCCollectionException- collection error detected
- (void) insertCollection: (id<SCCollection>)  collection
atIndexes: (NSIndexSet *)  indexes 

Inserts the objects from the provided collection of any supported type into the receiving array at the specified indexes.

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

Inserts into the receiving array the specified existing object at a given index.

Parameters
object- the inserting existing object
index- the index at which to insert object
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (BOOL) isEqualToArray: (SCArray *)  array

Returns a boolean value that indicates whether the contents of the receiving array is equals to the contents of another given array.

Parameters
array- the array with which to compare the receiving array
Returns
YES if the contents of other array is equals to the contents of the receiving array, otherwise NO
- (void) moveObjectAtIndex: (SCIndex index
toIndex: (SCIndex destination 

Moves the object ath the specified source index to a given destination index.

Parameters
index- the source index of the object to be move
destination- the destination index
Exceptions
SCCollectionException- collection error detected
- (void) moveObjectsInRange: (NSRange)  range
toIndex: (SCIndex destination 

Moves the objects in the specified range to a given destination index.

Parameters
range- the range of the objects to be move
destination- the destination index
Exceptions
SCCollectionException- collection error detected
- (id) objectAtIndex: (SCIndex index

Returns the object located at the specified index.

Parameters
index- the index within the bounds of the array
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 array
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 an array containing the objects in the receving array at the indexes specified by a given index set.

Parameters
indexes- the index set with indexes of the required objects
Returns
Array with the required objects
Exceptions
SCCollectionException- collection error detected
- (SCArray *) objectsInRange: (NSRange)  range

Returns an array containg the objects in the receiving array in the specified range.

Parameters
range- the range of the requited objects
Returns
Array with the objecst in the specified range
Exceptions
SCCollectionException- collection error detected
- (void) removeFirstObject

Removes the first object from the receiving array.

Exceptions
SCCollectionException- collection error detected
- (void) removeLastObject

Removes the object with the highest-valued index in the receiving array.

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

Removes from the receiving array the object at the specified index.

Parameters
index- the index from which to remove the object in the array
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (void) removeObjectsAtIndexes: (NSIndexSet *)  indexes

Removes the objects at the specified indexes from the receiving array.

Parameters
indexes- the indexes of the objects to remove from the array
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableIndexedCollection>.

- (void) removeObjectsInRange: (NSRange)  range

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

Parameters
range- the range of objects to be removed from the array
Exceptions
SCCollectionException- collection error detected
- (void) replaceObjectAtIndex: (SCIndex index
withObject: (id<SCCollectioning>)  object 

Replaces the object at the specified index with a given object.

Parameters
index- the index of the 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 in the receiving array at the specified indexes with the objects from a given collection of any supported type.

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

Replaces the objects in the receiving array at locations specified with the objects from a given nil teminated list.

Parameters
indexes- the indexes of the objects to be replaced
object- the first object with which to replace the objects in the receiving array
...- other objects with which to replace the objects in the receiving array
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 array specified by a given range with the objects from a given collection of any supported type.

Parameters
range- the range of objects to be replaced in (or removed from) the receiving array
collection- the collection of objects from which to select replacements for the objects in the specified range
Exceptions
SCCollectionException- collection error detected
- (void) replaceObjectsInRange: (NSRange)  range
withObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Replaces the objects in the receiving array specified by a given range with the objects from a given nil terminated list.

Parameters
range- the range of objects to be replaced in (or removed from) the receiving array
object- the first object with which to replace the objects in the receiving array
...- other objects with which to replace the objects in the receiving array
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) reverse

Reverses the order of all objects in the receiving array.

Exceptions
SCCollectionException- collection error detected
- (void) setArray: (SCArray *)  array

Replaces the content and settings of the receiving array by using the content and settings from the specified existing array.

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

Replaces the settings and content of the receiving array by using the settings and ascending sorted content of 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 content of the receiving array by using the settings and ascending sorted content of the specified existing source collection of any supported type with a given 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 content of the receiving array by using the settings and descending sorted content of 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 content of the receiving array by using the settings and descending sorted content of the specified existing source collection of any supported type with a given 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 

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

Parameters
object- the object with which to replace the object at the specified index
index- the index of the object to be replaced
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) setSortedCollection: (id<SCCollection>)  collection

Replaces the settings and content of the receiving array by using the settings and ascending sorted content of 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 content of the receiving array by using the settings and ascending sorted content of the specified existing collection of any supported type with a given 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 receiving array using the default data sorter.

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

Sorts ascending 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 array using the specified data sorter.

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

Sorts descending the receiving array using the default data sorter.

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

Sorts descending the receiving array using the specified data sorter.

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

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

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

Sorts ascending the receiving array using the specified data sorter.

Parameters
sorter- the data sorter
Exceptions
SCCollectionException- collection error detected
See also
- sortAscendingWithSorter:
- (SCArray *) subarrayWithRange: (NSRange)  range

Returns the new array containing the receiving array objects that fall within the limits specified by a given range.

Parameters
range- the range within the receiving array range of objects
Returns
An array with objects in a given range from the receiving array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3

Property Documentation

- (SCArray *) ascendingSortedArray
readnonatomicassign

Array with ascending sorted objects

See also
sortedArray
- (SCArray *) descendingSortedArray
readnonatomicassign

Array with descending sorted objects

- (id) firstObject
readnonatomicassign

Fist object in the array

- (SCIndex) indexOfLastObject
readnonatomicassign

An index of the last object within the collection

- (id) lastObject
readnonatomicassign

Last object in the array

- (SCArray *) reversedArray
readnonatomicretain

Array with objects in reverse order

- (SCArray *) sortedArray
readnonatomicassign

Array with ascending sorted objects

See also
ascendingSortedArray

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