ObjFW
Public Member Functions
OFMutableArray Class Reference

An abstract class for storing, adding and removing objects in anr array. More...

#import <OFMutableArray.h>

Inheritance diagram for OFMutableArray:
OFArray OFObject <OFCopying> <OFMutableCopying> <OFCollection> <OFSerialization> <OFJSON> <OFObject> <OFEnumerating> <OFFastEnumeration>

List of all members.

Public Member Functions

(void) - addObject:
 Adds an object to the OFArray.
(void) - addObject:atIndex:
 Adds an object to the OFArray at the specified index.
(void) - replaceObject:withObject:
 Replaces the first object equivalent to the specified object with the other specified object.
(void) - replaceObjectAtIndex:withObject:
 Replaces the object at the specified index with the specified object.
(void) - replaceObjectIdenticalTo:withObject:
 Replaces the first object that has the same address as the specified object with the other specified object.
(void) - removeObject:
 Removes the first object equivalent to the specified object.
(void) - removeObjectIdenticalTo:
 Removes the first object that has the same address as the specified object.
(void) - removeObjectAtIndex:
 Removes the object at the specified index.
(void) - removeNObjects:
 Removes the specified amount of objects from the end of the OFArray.
(void) - removeObjectsInRange:
 Removes the object in the specified range.
(void) - removeLastObject
 Removes the last object.
(void) - removeAllObjects
 Removes all objects.
(void) - replaceObjectsUsingBlock:
 Replaces each object with the object returned by the block.
(void) - swapObjectAtIndex:withObjectAtIndex:
 Swaps the objects at the specified indices.
(void) - sort
 Sorts the array.
(void) - reverse
 Reverts the order of the objects in the array.
(void) - makeImmutable
 Converts the mutable array to an immutable array.

Detailed Description

An abstract class for storing, adding and removing objects in anr array.


Member Function Documentation

- (void) addObject: (id)  object

Adds an object to the OFArray.

Parameters:
objectAn object to add
- (void) addObject: (id)  object
atIndex: (size_t)  index 

Adds an object to the OFArray at the specified index.

Parameters:
objectAn object to add
indexThe index where the object should be added
- (void) removeNObjects: (size_t)  nObjects

Removes the specified amount of objects from the end of the OFArray.

Parameters:
nObjectsThe number of objects to remove
- (void) removeObject: (id)  object

Removes the first object equivalent to the specified object.

Parameters:
objectThe object to remove
- (void) removeObjectAtIndex: (size_t)  index

Removes the object at the specified index.

Parameters:
indexThe index of the object to remove
- (void) removeObjectIdenticalTo: (id)  object

Removes the first object that has the same address as the specified object.

Parameters:
objectThe object to remove
- (void) removeObjectsInRange: (of_range_t range

Removes the object in the specified range.

Parameters:
rangeThe range of the objects to remove
- (void) replaceObject: (id)  oldObject
withObject: (id)  newObject 

Replaces the first object equivalent to the specified object with the other specified object.

Parameters:
oldObjectThe object to replace
newObjectThe replacement object
- (void) replaceObjectAtIndex: (size_t)  index
withObject: (id)  object 

Replaces the object at the specified index with the specified object.

Parameters:
indexThe index of the object to replace
objectThe replacement object
- (void) replaceObjectIdenticalTo: (id)  oldObject
withObject: (id)  newObject 

Replaces the first object that has the same address as the specified object with the other specified object.

Parameters:
oldObjectThe object to replace
newObjectThe replacement object
- (void) replaceObjectsUsingBlock: (of_array_replace_block_t)  block

Replaces each object with the object returned by the block.

Parameters:
blockThe block which returns a new object for each object
- (void) swapObjectAtIndex: (size_t)  index1
withObjectAtIndex: (size_t)  index2 

Swaps the objects at the specified indices.

Parameters:
index1The index of the first object to swap
index2The index of the second object to swap

The documentation for this class was generated from the following files:
 All Classes Functions Variables Properties