17 #ifndef __STDC_LIMIT_MACROS
18 # define __STDC_LIMIT_MACROS
20 #ifndef __STDC_CONSTANT_MACROS
21 # define __STDC_CONSTANT_MACROS
27 #import "OFCollection.h"
28 #import "OFEnumerator.h"
29 #import "OFSerialization.h"
30 #import "OFJSONRepresentation.h"
35 typedef void (^of_array_enumeration_block_t)(
id object,
size_t index,
37 typedef BOOL (^of_array_filter_block_t)(
id odject,
size_t index);
38 typedef id (^of_array_map_block_t)(
id object,
size_t index);
39 typedef id (^of_array_fold_block_t)(
id left,
id right);
47 #ifdef OF_HAVE_PROPERTIES
48 @property (readonly)
size_t count;
56 + (instancetype)
array;
64 + (instancetype)arrayWithObject: (
id)object;
72 + (instancetype)arrayWithObjects: (
id)
firstObject, ... OF_SENTINEL;
90 + (instancetype)arrayWithObjects: (
id const*)
objects
99 - initWithObject: (id)
object;
107 - initWithObjects: (id)
firstObject, ... OF_SENTINEL;
116 - initWithObject: (id)firstObject
117 arguments: (va_list)arguments;
135 - initWithObjects: (
id const*)
objects
147 - (id)objectAtIndex: (
size_t)index;
148 - (id)objectAtIndexedSubscript: (
size_t)index;
156 - (void)getObjects: (__unsafe_unretained
id*)buffer
174 - (size_t)indexOfObject: (
id)object;
184 - (size_t)indexOfObjectIdenticalTo: (
id)object;
194 - (BOOL)containsObjectIdenticalTo: (
id)object;
241 usingSelector: (SEL)selector;
248 - (void)makeObjectsPerformSelector: (
SEL)selector;
258 - (void)makeObjectsPerformSelector: (
SEL)selector
259 withObject: (id)
object;
281 - (
OFArray*)arrayByAddingObject: (
id)object;
297 - (
OFArray*)arrayByRemovingObject: (
id)object;
299 #ifdef OF_HAVE_BLOCKS
305 - (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block;
313 - (
OFArray*)mappedArrayUsingBlock: (of_array_map_block_t)block;
323 - (
OFArray*)filteredArrayUsingBlock: (of_array_filter_block_t)block;
341 - (id)foldUsingBlock: (of_array_fold_block_t)block;
349 unsigned long mutations;
350 unsigned long *mutationsPtr;
354 - initWithArray: (
OFArray*)data
355 mutationsPtr: (
unsigned long*)mutationsPtr;
358 #import "OFMutableArray.h"
360 #ifndef NSINTEGER_DEFINED
362 @compatibility_alias NSArray
OFArray;