19 OF_ASSUME_NONNULL_BEGIN
40 #ifdef OF_HAVE_GENERICS
44 # define ObjectType id
55 + (instancetype)arrayWithCapacity: (size_t)capacity;
64 - initWithCapacity: (size_t)capacity;
71 - (void)addObject: (ObjectType)object;
78 - (void)addObjectsFromArray: (OFArray OF_GENERIC(ObjectType)*)
array;
86 - (void)insertObject: (ObjectType)object
87 atIndex: (size_t)index;
95 - (void)insertObjectsFromArray: (OFArray OF_GENERIC(ObjectType)*)
array
96 atIndex: (size_t)index;
105 - (void)replaceObject: (ObjectType)oldObject
106 withObject: (ObjectType)newObject;
114 - (void)replaceObjectAtIndex: (size_t)index
115 withObject: (ObjectType)object;
116 - (void)setObject: (ObjectType)object
117 atIndexedSubscript: (size_t)index;
126 - (void)replaceObjectIdenticalTo: (ObjectType)oldObject
127 withObject: (ObjectType)newObject;
134 - (void)removeObject: (ObjectType)object;
142 - (void)removeObjectIdenticalTo: (ObjectType)object;
149 - (void)removeObjectAtIndex: (size_t)index;
156 - (void)removeObjectsInRange: (of_range_t)range;
168 #ifdef OF_HAVE_BLOCKS
174 - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block;
183 - (void)exchangeObjectAtIndex: (size_t)index1
184 withObjectAtIndex: (size_t)index2;
200 - (void)sortWithOptions: (int)options;
212 #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
216 OF_ASSUME_NONNULL_END
instancetype array()
Creates a new OFArray.
Definition: OFArray.m:133
An abstract class for storing objects in an array.
Definition: OFArray.h:95
void makeImmutable()
Converts the mutable array to an immutable array.
Definition: OFMutableArray.m:414
void removeAllObjects()
Removes all objects.
Definition: OFMutableArray.m:351
void removeLastObject()
Removes the last object.
Definition: OFMutableArray.m:341
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:46
void sort()
Sorts the array.
Definition: OFMutableArray.m:387
void reverse()
Reverts the order of the objects in the array.
Definition: OFMutableArray.m:402
id OF_NONNULL(^ of_array_replace_block_t)(id object, size_t index)
A block for replacing values in an OFMutableArray.
Definition: OFMutableArray.h:31