22OF_ASSUME_NONNULL_BEGIN
48#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
58+ (instancetype)arrayWithCapacity: (
size_t)capacity;
65- (instancetype)
init OF_DESIGNATED_INITIALIZER;
74- (instancetype)initWithCapacity: (
size_t)capacity OF_DESIGNATED_INITIALIZER;
81- (void)addObject: (ObjectType)object;
88- (void)addObjectsFromArray: (
OFArray OF_GENERIC(ObjectType) *)array;
96- (void)insertObject: (ObjectType)object atIndex: (
size_t)index;
104- (void)insertObjectsFromArray: (
OFArray OF_GENERIC(ObjectType) *)array
105 atIndex: (
size_t)index;
114- (void)replaceObject: (ObjectType)oldObject withObject: (ObjectType)newObject;
122- (void)replaceObjectAtIndex: (
size_t)index withObject: (ObjectType)object;
134- (void)setObject: (ObjectType)object atIndexedSubscript: (
size_t)index;
143- (void)replaceObjectIdenticalTo: (ObjectType)oldObject
144 withObject: (ObjectType)newObject;
151- (void)removeObject: (ObjectType)object;
159- (void)removeObjectIdenticalTo: (ObjectType)object;
166- (void)removeObjectAtIndex: (
size_t)index;
173- (void)removeObjectsInRange: (
OFRange)range;
200- (void)exchangeObjectAtIndex: (
size_t)index1 withObjectAtIndex: (
size_t)index2;
224 context: (nullable
void *)context
247#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
OFArraySortOptions
Options for sorting an array.
Definition OFArray.h:56
id(^ OFArrayReplaceBlock)(id object, size_t index)
A block for replacing values in an OFMutableArray.
Definition OFMutableArray.h:34
OFComparisonResult(^ OFComparator)(id left, id right)
A comparator to compare two objects.
Definition OFObject.h:86
OFComparisonResult(* OFCompareFunction)(id left, id right, void *context)
A function to compare two objects.
Definition OFObject.h:75
An abstract class for storing objects in an array.
Definition OFArray.h:109
An abstract class for storing, adding and removing objects in an array.
Definition OFMutableArray.h:48
void removeLastObject()
Removes the last object.
Definition OFMutableArray.m:306
void makeImmutable()
Converts the mutable array to an immutable array.
Definition OFMutableArray.m:420
void removeAllObjects()
Removes all objects.
Definition OFMutableArray.m:316
instancetype init()
Initializes an OFMutableArray with no objects.
Definition OFMutableArray.m:164
void sort()
Sorts the array in ascending order.
Definition OFMutableArray.m:348
void reverse()
Reverts the order of the objects in the array.
Definition OFMutableArray.m:409
A range.
Definition OFObject.h:110