Samond Classes Library 1.2.6-STABLE build 219
|
Class for support the bidirectional lists of objects. More...
#import <SCBidirectionalList.h>
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 |
Class for support the bidirectional lists of objects.
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:
- (void) duplicateLastObject |
Duplicates the first object within the receiving list.
SCCollectionException | - collection error detected |
- (void) insertLastCollection: | (id<SCCollection>) | collection |
Inserts the objects from the specified collection into the receiving list before the last object.
collection | - the collection of objects to add into the receiving list |
SCCollectionException | - collection error detected |
- (void) insertLastObject: | (id<SCCollectioning>) | object |
Inserts a given object into the receiving list before the last object.
object | - the object to add into the list |
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.
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 |
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.
- (void) removeLastObject |
Removes the last object from the receiving list.
SCCollectionException | - collection error detected |
- (void) replaceLastObjectWithObject: | (id<SCCollectioning>) | object |
Replaces the last object with a given object.
object | - the object with which to replace the last object |
SCCollectionException | - collection error detected |
|
readnonatomicassign |
The last object within the list or nil if the list is empty