Samond Classes Library 1.2.1-RELEASE build 181
|
Unidirectional list class. More...
#import <SCUnidirectionalList.h>
Creating Lists | |
(instancetype) | + listWithCoder: |
(instancetype) | + listWithContentsOfSerializedFile: |
(instancetype) | + listWithDataDictionary: |
(instancetype) | + listWithDataDictionaryFromFile: |
(instancetype) | + listWithStream: |
(instancetype) | + listWithFileStream: |
(instancetype) | + listWithName: |
(instancetype) | + listWithObject: |
(instancetype) | + listWithObjects: |
(instancetype) | + listWithCollection: |
(instancetype) | + listWithList: |
(instancetype) | + list |
Unidirectional list class.
Class implements the unidirection list - a collection, which contains object nodes which have a data field as a "next" field, which points to the next object node in line of object nodes. Operations that can be performed on unidirectional lists include insertion, deletion and travesal.
New objects can be added into the end of unidirectional list. For access to the object you must process the all previous objects from the begin of the list. Unidirectional list supports only one direction of object processing - from previous to the next object.
Unidirectional list allows direct access only to the first object and to the current object.
Class instances can thrown the following exceptions:
+ (instancetype) list |
Creates and returns an unnamed empty unidirectional list.
+ (instancetype) listWithCoder: | (NSCoder *) | coder |
Returns an unidirectional list created by using the specified coder.
coder | - the source coder |
+ (instancetype) listWithCollection: | (id<SCCollection>) | collection |
Returns an unidirectional list created by using the objects from the specified collection of any supported type.
collection | - the existing source collection |
SCCollectionException | - collection error detected |
+ (instancetype) listWithContentsOfSerializedFile: | (NSString *) | path |
Returns an unidirectional list created by using the content of the serialized file with the specified path.
path | - the path to the source serialized file |
+ (instancetype) listWithDataDictionary: | (NSDictionary *) | dictionary |
Returns an unidirectional list created by using the specified data dictionary.
dictionary | - the source data dictionary |
+ (instancetype) listWithDataDictionaryFromFile: | (NSString *) | path |
Returns an unidirectional list created by using the data dictionary from the specified file.
path | - the path to the source data dictionary file |
+ (instancetype) listWithFileStream: | (NSString *) | path |
Returns an unidirectional list created by using the data from the file stream with the specified path.
path | - the path to the source file stream |
SCStreamException | - stream error detected |
SCSystemException | - system error detected |
+ (instancetype) listWithList: | (SCList *) | list |
Creates and returns an unidirectional list containing objects from another given list.
list | - a list containing the objects with which to initializes the new unidirectional list |
SCCollectionException | - collection error detected |
+ (instancetype) listWithName: | (NSString *) | name |
Returns an empty unidirectional list created by using the specified list name.
name | - the name of the new unidirectional list |
+ (instancetype) listWithObject: | (id<SCCollectioning>) | object |
Creates and returns an unidirectional list containing a given object.
object | - the object to adding into the unidirectional list |
+ (instancetype) listWithObjects: | (id<SCCollectioning>) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Creates and returns an unidirectional list containing the objects from the specified list.
object | - the first object to add into the new unidirectional list |
... | - a null-terminated list of alternating objects to add into the new list |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
+ (instancetype) listWithStream: | (SCStream *) | stream |
Returns an unidirectional list created by using the data from the specified stream.
stream | - the source stream |
SCStreamException | - stream error detected |
SCSystemException | - system error detected |