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

Class for support the bidirectional lists of objects. More...

#import <SCBidirectionalList.h>

+ Inheritance diagram for SCBidirectionalList:

Querying a List

id lastObject
 

List Control

(id) - previousObject
 

Adding Objects

(void) - insertLastObject:
 
(void) - insertLastObjects:
 
(void) - insertLastCollection:
 

Removing Objects

(void) - removeLastObject
 

Replacing Objects

(void) - replaceLastObjectWithObject:
 

Copying Objects

(void) - duplicateLastObject
 

Additional Inherited Members

- Instance Methods inherited from SCList
(instancetype) - initWithName:
 
(instancetype) - initWithObject:
 
(instancetype) - initWithObjects:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithArray:
 
(instancetype) - initWithList:
 
(instancetype) - init
 
(void) - setList:
 
(BOOL) - isEqualToList:
 
(instancetype) - listByAddingObject:
 
(instancetype) - listByAddingObjects:
 
(instancetype) - listByAddingCollection:
 
(instancetype) - listByAddingObjectsFromArray:
 
(instancetype) - listByAddingArray:
 
(instancetype) - listByAddingObjectsFromList:
 
(instancetype) - listByAddingList:
 
(id) - nextObject
 
(void) - insertCurrentObject:
 
(void) - insertCurrentObjects:
 
(void) - insertCurrentCollection:
 
(void) - insertFirstObject:
 
(void) - insertFirstObjects:
 
(void) - insertFirstCollection:
 
(void) - addObjectsFromArray:
 
(void) - addArray:
 
(void) - addObjectsFromList:
 
(void) - addList:
 
(void) - removeCurrentObject
 
(void) - removeFirstObject
 
(void) - replaceCurrentObjectWithObject:
 
(void) - replaceFirstObjectWithObject:
 
(void) - duplicateCurrentObject
 
(void) - duplicateFirstObject
 
- 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) - 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 SCList
(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
 
- 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
 
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

Class for support the bidirectional lists of objects.

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

In the bidirectional list each object node contains, besides the next-node link, a seconf link field pointing to the previous node in the sequence. The two links may be called forwards and backwards, or next and prev.

Class SCBidirectionalList provides changing the current object pointer in two directions - from current object to the next object and from current to the previous object. Additionally, class SCBidirectionalList declares the methods for accessing to the list last object.

Class instances can thrown the following exceptions:

Method Documentation

- (void) duplicateLastObject

Duplicates the first object within the receiving list.

Exceptions
SCCollectionException- collection error detected
- (void) insertLastCollection: (id<SCCollection>)  collection

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

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

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

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

Inserts the objects from the specified null-terminated list into the receiving list before the last 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
- (id) previousObject

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

Returns
A previous object or nil if the current object is a fist object within the list
- (void) removeLastObject

Removes the last object from the receiving list.

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

Replaces the last object with a given object.

Parameters
object- the object with which to replace the last object
Exceptions
SCCollectionException- collection error detected

Property Documentation

- (id) lastObject
readnonatomicassign

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


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