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

Unidirectional list class. More...

#import <SCUnidirectionalList.h>

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

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
 

Additional Inherited Members

- Instance Methods inherited from SCList
(instancetype) - initWithName:
 
(instancetype) - initWithObject:
 
(instancetype) - initWithObjects:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithList:
 
(instancetype) - init
 
(void) - setList:
 
(BOOL) - isEqualToList:
 
(BOOL) - isEqualToContentsOfList:
 
(id) - nextObject
 
(void) - insertCurrentObject:
 
(void) - insertCurrentObjects:
 
(void) - insertCurrentCollection:
 
(void) - insertFirstObject:
 
(void) - insertFirstObjects:
 
(void) - insertFirstCollection:
 
(void) - removeCurrentObject
 
(void) - removeFirstObject
 
(void) - replaceCurrentObjectWithObject:
 
(void) - replaceFirstObjectWithObject:
 
(void) - duplicateCurrentObject
 
(void) - duplicateFirstObject
 
- 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 SCList
id currentObject
 
id firstObject
 
- 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

Unidirectional list class.

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

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:

Method Documentation

+ (instancetype) list

Creates and returns an unnamed empty unidirectional list.

Returns
A created unidirectional list
+ (instancetype) listWithCoder: (NSCoder *)  coder

Returns an unidirectional list created by using the specified coder.

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

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

Parameters
collection- the existing source collection
Returns
A created unidirectional list
Exceptions
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.

Parameters
path- the path to the source serialized file
Returns
A created unidirectional list
+ (instancetype) listWithDataDictionary: (NSDictionary *)  dictionary

Returns an unidirectional list created by using the specified data dictionary.

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

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

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

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

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

Creates and returns an unidirectional list containing objects from another given list.

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

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

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

Creates and returns an unidirectional list containing a given object.

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

Creates and returns an unidirectional list containing the objects from the specified list.

Parameters
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
Returns
A new unidirectional list containing the specified objects
+ (instancetype) listWithStream: (SCStream *)  stream

Returns an unidirectional list created by using the data from the specified stream.

Parameters
stream- the source stream
Returns
A created unidirectional list
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected

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