ObjFW
|
A class which provides easy to use double-linked lists. More...
#import <OFList.h>
Public Member Functions | |
(of_list_object_t *) | - firstListObject |
Returns the first list object of the list. | |
(of_list_object_t *) | - lastListObject |
Retrusn the last list object of the list. | |
(of_list_object_t *) | - appendObject: |
Appends an object to the list. | |
(of_list_object_t *) | - prependObject: |
Prepends an object to the list. | |
(of_list_object_t *) | - insertObject:beforeListObject: |
Inserts an object before another list object. | |
(of_list_object_t *) | - insertObject:afterListObject: |
Inserts an object after another list object. | |
(void) | - removeListObject: |
Removes the object with the specified list object from the list. | |
(BOOL) | - containsObjectIdenticalTo: |
Checks whether the list contains an object with the specified address. | |
(id) | - firstObject |
Returns the first object of the list or nil. | |
(id) | - lastObject |
Returns the last object of the list or nil. | |
Static Public Member Functions | |
(id) | + list |
Creates a new OFList. |
A class which provides easy to use double-linked lists.
- (of_list_object_t *) appendObject: | (id) | object |
Appends an object to the list.
object | The object to append |
- (BOOL) containsObjectIdenticalTo: | (id) | object |
Checks whether the list contains an object with the specified address.
object | The object which is checked for being in the list |
- (of_list_object_t*) firstListObject |
Returns the first list object of the list.
- (id) firstObject |
Returns the first object of the list or nil.
The returned object is not retained and autoreleased for performance reasons!
- (of_list_object_t *) insertObject: | (id) | object | |
afterListObject: | (of_list_object_t*) | listObject | |
Inserts an object after another list object.
object | The object to insert |
listObject | The of_list_object_t of the object after which it should be inserted |
- (of_list_object_t *) insertObject: | (id) | object | |
beforeListObject: | (of_list_object_t*) | listObject | |
Inserts an object before another list object.
object | The object to insert |
listObject | The of_list_object_t of the object before which it should be inserted |
- (of_list_object_t*) lastListObject |
Retrusn the last list object of the list.
- (id) lastObject |
Returns the last object of the list or nil.
The returned object is not retained and autoreleased for performance reasons!
- (of_list_object_t *) prependObject: | (id) | object |
Prepends an object to the list.
object | The object to prepend |
- (void) removeListObject: | (of_list_object_t*) | listObject |
Removes the object with the specified list object from the list.
listObject | The list object returned by append / prepend |