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

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

#import <SCList.h>

Inheritance diagram for SCList:
SCCollection SCObject <SCMutableCollection> <SCCollection> SCBidirectionalList SCUnidirectionalList

Initializing Lists

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

Querying a List

id currentObject
 
id firstObject
 

Copying Lists

(void) - setList:
 

Comparing Lists

(BOOL) - isEqualToList:
 
(BOOL) - isEqualToContentsOfList:
 

List Control

(id) - nextObject
 

Adding Objects

(void) - insertCurrentObject:
 
(void) - insertCurrentObjects:
 
(void) - insertCurrentCollection:
 
(void) - insertFirstObject:
 
(void) - insertFirstObjects:
 
(void) - insertFirstCollection:
 

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:
 
(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) - isSortable
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
- Instance Methods inherited from <SCMutableCollection>
- Instance Methods inherited from <SCCollection>
- Class Methods inherited from SCCollection
(BOOL) + isCollectionClass:
 
(BOOL) + isLibraryCollectionClass:
 
(BOOL) + isFoundationCollectionClass:
 
(BOOL) + isArrayClass:
 
(BOOL) + isLibraryArrayClass:
 
(BOOL) + isFoundationArrayClass:
 
(BOOL) + isSetClass:
 
(BOOL) + isLibrarySetClass:
 
(BOOL) + isFoundationSetClass:
 
(BOOL) + isOrderedSetClass:
 
(BOOL) + isLibraryOrderedSetClass:
 
(BOOL) + isFoundationOrderedSetClass:
 
(BOOL) + isDictionaryClass:
 
(BOOL) + isLibraryDictionaryClass:
 
(BOOL) + isFoundationDictionaryClass:
 
(BOOL) + isStackClass:
 
(BOOL) + isQueueClass:
 
(BOOL) + isListClass:
 
(BOOL) + isSortableClass:
 
(BOOL) + isCollection:
 
(BOOL) + isLibraryCollection:
 
(BOOL) + isFoundationCollection:
 
(BOOL) + isArray:
 
(BOOL) + isLibraryArray:
 
(BOOL) + isFoundationArray:
 
(BOOL) + isSet:
 
(BOOL) + isLibrarySet:
 
(BOOL) + isFoundationSet:
 
(BOOL) + isOrderedSet:
 
(BOOL) + isLibraryOrderedSet:
 
(BOOL) + isFoundationOrderedSet:
 
(BOOL) + isDictionary:
 
(BOOL) + isLibraryDictionary:
 
(BOOL) + isFoundationDictionary:
 
(BOOL) + isStack:
 
(BOOL) + isQueue:
 
(BOOL) + isList:
 
(BOOL) + isSortable:
 
- Properties inherited from SCCollection
NSString * name
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
SCIndex count
 
BOOL empty
 
NSString * typeName
 
NSString * description
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
- Properties inherited from <SCCollection>
NSString * name
 
SCIndex count
 
BOOL empty
 
NSString * description
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
NSEnumerator * objectEnumerator
 

Detailed Description

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) 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
- (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.

Attention
Designed initializer
Parameters
name- the list name
Returns
A newly initialized list
- (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) isEqualToContentsOfList: (SCList *)  list

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

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

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

- (id) firstObject
readnonatomicretain

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


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