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

Parent class of the object list classes. More...

#import <SCList.h>

+ Inheritance diagram for SCList:

Creating Lists

(instancetype) + listWithCoder:
 
(instancetype) + listWithContentsOfSerializedFile:
 
(instancetype) + listWithDataDictionary:
 
(instancetype) + listWithDataDictionaryFromFile:
 
(instancetype) + listWithStream:
 
(instancetype) + listWithFileStream:
 
(instancetype) + listWithData:
 
(instancetype) + listWithContentsOfFile:
 
(instancetype) + listWithContentsOfURL:
 
(instancetype) + listWithContentsOfURLString:
 
(instancetype) + listWithName:
 
(instancetype) + listWithObject:
 
(instancetype) + listWithObjects:
 
(instancetype) + listWithCollection:
 
(instancetype) + listWithArray:
 
(instancetype) + listWithList:
 
(instancetype) + list
 

Initializing Lists

(instancetype) - initWithName:
 
(instancetype) - initWithObject:
 
(instancetype) - initWithObjects:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithArray:
 
(instancetype) - initWithList:
 
(instancetype) - init
 

Querying a List

id currentObject
 
id firstObject
 

Copying Lists

(void) - setList:
 

Comparing Lists

(BOOL) - isEqualToList:
 

Deriving New Lists

(instancetype) - listByAddingObject:
 
(instancetype) - listByAddingObjects:
 
(instancetype) - listByAddingCollection:
 
(instancetype) - listByAddingObjectsFromArray:
 
(instancetype) - listByAddingArray:
 
(instancetype) - listByAddingObjectsFromList:
 
(instancetype) - listByAddingList:
 

List Control

(id) - nextObject
 

Adding Objects

(void) - insertCurrentObject:
 
(void) - insertCurrentObjects:
 
(void) - insertCurrentCollection:
 
(void) - insertFirstObject:
 
(void) - insertFirstObjects:
 
(void) - insertFirstCollection:
 
(void) - addObjectsFromArray:
 
(void) - addArray:
 
(void) - addObjectsFromList:
 
(void) - addList:
 

Removing Objects

(void) - removeCurrentObject
 
(void) - removeFirstObject
 

Replacing Objects

(void) - replaceCurrentObjectWithObject:
 
(void) - replaceFirstObjectWithObject:
 

Copying Objects

(void) - duplicateCurrentObject
 
(void) - duplicateFirstObject
 

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) - removeObjectsWithClass:
 
(void) - removeObjectsWithClassName:
 
(void) - removeCollection:
 
(void) - removeObject:
 
(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>
- 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
 

Detailed Description

Parent class of the object list classes.

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

Class declares the common methods for classes, which represent the lists of objects.
Class instances can thrown the following exceptions:

Method Documentation

- (void) addArray: (SCArray *)  array

Adds into the receiving list objects from a given array.

Parameters
array- an array with objects to add to the list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromArray:
- (void) addList: (SCList *)  list

Adds into the receiving list objects from a given another list.

Parameters
list- a list with objects to add to the list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromList:
- (void) addObjectsFromArray: (SCArray *)  array

Adds into the receiving list objects from a given array.

Parameters
array- an array with objects to add to the list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addArray:
- (void) addObjectsFromList: (SCList *)  list

Adds into the receiving list objects from a given another list.

Parameters
list- a list with objects to add to the list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addList:
- (void) duplicateCurrentObject

Duplicates the current object within the receiving list.

Exceptions
SCCollectionException- collection error detected
- (void) duplicateFirstObject

Duplicates the first object within the receiving list.

Exceptions
SCCollectionException- collection error detected
- (instancetype) init

Initializes an empty unnamed list.

Returns
A newly initialized list

Reimplemented from SCCollection.

- (instancetype) initWithArray: (SCArray *)  array

Initializes a newly allocated list by placing in it the objects contained in a given array.

Parameters
array- an array with objects to add into the new list
Returns
A newly initialized list with objects from a given array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (instancetype) initWithCollection: (id<SCCollection>)  collection

Initializes a newly allocated list with objects from the specified collection of any supported type.

Parameters
collection- a collection with objects to add into the list
Returns
An initialized list with the objects from a given collection
Exceptions
SCCollectionException- collection error detected

Reimplemented from SCCollection.

- (instancetype) initWithList: (SCList *)  list

Initializes a newly allocated list by placing in it the objects contained in another given list.

Attention
Designed initializer
Parameters
list- a list containing the objects with which to initialize the new list
Returns
An initialized list containing the objects found in the specified source list
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithName: (NSString *)  name

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

Parameters
name- the list name
Returns
A newly initialized list

Reimplemented from SCCollection.

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

Initializes a newly allocated list containing a given object.

Parameters
object- the object to adding into the list
Returns
An initialized list containing a single object
- (instancetype) initWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a newly allocated list containing objects from the specified list.

Parameters
object- the first object to add into the list
...- a null-terminated list of alternating objects to add into the list
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
An initialized list containing the specified objects
- (void) insertCurrentCollection: (id<SCCollection>)  collection

Inserts the objects from the specified collection into the receiving list before the current object.

Parameters
collection- the collection of objects to add into the receiving list
Exceptions
SCCollectionException- collection error detected
- (void) insertCurrentObject: (id<SCCollectioning>)  object

Inserts a given object into the receiving list before the current object.

Parameters
object- the object to add into the list
Exceptions
SCCollectionException- collection error detected
- (void) insertCurrentObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Inserts the objects from the specified list into the receiving list before the current object.

Parameters
object- the first object to add into the list
...- other objects from the null-terminated list to add into the receiving list
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (void) insertFirstCollection: (id<SCCollection>)  collection

Inserts the objects from the specified collection into the receiving list before the first object.

Parameters
collection- the collection of objects to add into the receiving list
Exceptions
SCCollectionException- collection error detected
- (void) insertFirstObject: (id<SCCollectioning>)  object

Inserts a given object into the receiving list before the first object.

Parameters
object- the object to add into the list
Exceptions
SCCollectionException- collection error detected
- (void) insertFirstObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Inserts the objects from the specified list into the receiving list before the first object.

Parameters
object- the first object to add into the list
...- other objects from the null-terminated list to add into the receiving list
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (BOOL) isEqualToList: (SCList *)  list

Returns a boolean value that indicates whether the settings and contents of the receiving list are equal to the settings and contents of another given list.

Parameters
list- the list with which to compare the receiving list
Returns
YES if the settings and contents of the specified list are equal to the settings and contents of the receiving list, otherwise NO
+ (instancetype) list

Creates and returns an unnamed empty list.

Returns
A created list
- (instancetype) listByAddingArray: (SCArray *)  array

Returns a new list that contains objects from the receiving list and a given array.

Parameters
array- an array with objects to add to the new list
Returns
A new list with objects from the receiving list and a given array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- listByAddingObjectsFromArray:
- (instancetype) listByAddingCollection: (id<SCCollection>)  collection

Returns a new list that contains objects from the receiving list and a given collection of any supported type.

Parameters
collection- a collection with objects to add to the new list
Returns
A new list with objects from the receiving list and a given collection
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (instancetype) listByAddingList: (SCList *)  list

Returns a new list that contains objects from the receiving list and a given another list.

Parameters
list- a list with objects to add to the new list
Returns
A new list with objects from the receiving list and a given another list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- listByAddingObjectsFromList:
- (instancetype) listByAddingObject: (id<SCCollectioning>)  object

Returns the new list that contains objects from the receiving list and a given object.

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

Returns a new list that contains objects from the receiving list and objects from the specified list.

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

Returns a new list that contains objects from the receiving list and a given array.

Parameters
array- an array with objects to add to the new list
Returns
A new list with objects from the receiving list and a given array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- listByAddingArray:
- (instancetype) listByAddingObjectsFromList: (SCList *)  list

Returns a new list that contains objects from the receiving list and a given another list.

Parameters
list- a list with objects to add to the new list
Returns
A new list with objects from the receiving list and a given another list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- listByAddingList:
+ (instancetype) listWithArray: (SCArray *)  array

Returns a list created by using objects from a given array.

Parameters
array- an array with objecrs to add into the new list
Returns
A created list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
+ (instancetype) listWithCoder: (NSCoder *)  coder

Returns a list created by using the specified coder.

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

Returns a list created by using the objects from the specified collection of any supported type.

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

Returns a list created by using the file with the specified path.

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

Returns a list created by using the content of the serialized file with the specified path.

Parameters
path- the path to the source serialized file
Returns
A created list
+ (instancetype) listWithContentsOfURL: (NSURL *)  url

Returns a list created by using the specified URL.

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

Returns a list created by using the data from the URL with the specified string.

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

Returns a list created by using the specified data object.

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

Returns a list created by using the specified data dictionary.

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

Returns a list created by using the data dictionary from the specified file.

Parameters
path- the path to the source data dictionary file
Returns
A created list
+ (instancetype) listWithFileStream: (NSString *)  path

Returns a list created by using the data from the file stream with the specified file.

Parameters
path- the path to the source file stream
Returns
A created list
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) listWithList: (SCList *)  list

Creates and returns a list containing objects from another given list.

Parameters
list- a list containing the objects with which to initialize the new list
Returns
A new list containing the objects found in the specified list
Exceptions
SCCollectionException- collection error detected
+ (instancetype) listWithName: (NSString *)  name

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

Parameters
name- the name of the new list
Returns
A created list
+ (instancetype) listWithObject: (id<SCCollectioning>)  object

Creates and returns a list containing a given object.

Parameters
object- the object to adding into the list
Returns
A new list containing a signe object
+ (instancetype) listWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Creates and returns a list containing the objects from the specified list.

Parameters
object- the first object to add into the new list
...- a null-terminated list of alternating objects to add into the new list
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A new list containing the specified objects
+ (instancetype) listWithStream: (SCStream *)  stream

Returns a list created by using the data from the specified stream.

Parameters
stream- the source stream
Returns
A created list
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
- (id) nextObject

Shifts the current object pointer to the next object in the receiving list and returns a pointer to the next object.

Returns
A next object or nil if the current object is a last object within the list
- (void) removeCurrentObject

Removes from the receiving list the current object.

Exceptions
SCCollectionException- collection error detected
- (void) removeFirstObject

Removes the first object from the receiving list.

Exceptions
SCCollectionException- collection error detected
- (void) replaceCurrentObjectWithObject: (id<SCCollectioning>)  object

Replaces the current object with a given object.

Parameters
object- the object with which to replace the current object
Exceptions
SCCollectionException- collection error detected
- (void) replaceFirstObjectWithObject: (id<SCCollectioning>)  object

Replaces the first object with a given object.

Parameters
object- the object with which to replace the first object
Exceptions
SCCollectionException- collection error detected
- (void) setList: (SCList *)  list

Sets the settings and contents of the receiving list to settings and objects in a given list.

Parameters
list- the source list
Exceptions
SCCollectionException- collection error detected

Property Documentation

- (id) currentObject
readnonatomicassign

The current object within the list or nil if the list is empty

- (id) firstObject
readnonatomicassign

The first object within the list or if the list is empty


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