19 OF_ASSUME_NONNULL_BEGIN
41 #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) 42 # define ObjectType id 51 + (instancetype)arrayWithCapacity: (
size_t)capacity;
60 - initWithCapacity: (
size_t)capacity;
67 - (void)addObject: (ObjectType)object;
74 - (void)addObjectsFromArray: (
OFArray OF_GENERIC(ObjectType) *)array;
82 - (void)insertObject: (ObjectType)object
83 atIndex: (
size_t)index;
91 - (void)insertObjectsFromArray: (
OFArray OF_GENERIC(ObjectType) *)array
92 atIndex: (
size_t)index;
101 - (void)replaceObject: (ObjectType)oldObject
102 withObject: (ObjectType)newObject;
110 - (void)replaceObjectAtIndex: (
size_t)index
111 withObject: (ObjectType)object;
112 - (void)setObject: (ObjectType)object
113 atIndexedSubscript: (
size_t)index;
122 - (void)replaceObjectIdenticalTo: (ObjectType)oldObject
123 withObject: (ObjectType)newObject;
130 - (void)removeObject: (ObjectType)object;
138 - (void)removeObjectIdenticalTo: (ObjectType)object;
145 - (void)removeObjectAtIndex: (
size_t)index;
152 - (void)removeObjectsInRange: (
of_range_t)range;
164 #ifdef OF_HAVE_BLOCKS 179 - (void)exchangeObjectAtIndex: (
size_t)index1
180 withObjectAtIndex: (
size_t)index2;
196 - (void)sortWithOptions: (
int)options;
207 #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) 212 OF_ASSUME_NONNULL_END
id _Nonnull(^ of_array_replace_block_t)(id object, size_t index)
A block for replacing values in an OFMutableArray.
Definition: OFMutableArray.h:31
void sort()
Sorts the array.
Definition: OFMutableArray.m:373
void removeLastObject()
Removes the last object.
Definition: OFMutableArray.m:327
void reverse()
Reverts the order of the objects in the array.
Definition: OFMutableArray.m:388
A range.
Definition: OFObject.h:66
An abstract class for storing objects in an array.
Definition: OFArray.h:89
void makeImmutable()
Converts the mutable array to an immutable array.
Definition: OFMutableArray.m:400
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:40
void removeAllObjects()
Removes all objects.
Definition: OFMutableArray.m:337