13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
-
+
+
+
+
+
+
+
|
#import "OFObject.h"
#import "OFDataArray.h"
@class OFString;
/**
* The OFArray class provides a class for storing objects in an array.
* The OFArray class is a class for storing objects in an array.
*/
@interface OFArray: OFObject <OFCopying, OFMutableCopying>
{
OFDataArray *array;
}
/**
* \return A new autoreleased OFArray
*/
+ array;
/**
* Creates a new OFArray with the specified object.
*
* \param obj An object
* \return A new autoreleased OFArray
*/
+ arrayWithObject: (OFObject*)obj;
/**
* Creates a new OFArray with the specified objects, terminated by nil.
*
* \param first The first object in the array
* \return A new autoreleased OFArray
*/
+ arrayWithObjects: (OFObject*)first, ...;
/**
* Creates a new OFArray with the objects from the specified C array.
*
* \param objs A C array of objects.
* \return A new autoreleased OFArray
*/
+ arrayWithCArray: (OFObject**)objs;
/**
* Initializes an OFArray with the specified object.
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
-
+
-
+
|
*
* \param objs A C array of objects
* \return An initialized OFArray
*/
- initWithCArray: (OFObject**)objs;
/**
* \return The number of objects in the OFArray
* \return The number of objects in the array
*/
- (size_t)count;
/**
* \return The objects of the array as a C array
*/
- (id*)cArray;
/**
* Returns a specific object of the OFArray.
* Returns a specific object of the array.
*
* \param index The number of the object to return
* \return The specified object of the OFArray
*/
- (id)objectAtIndex: (size_t)index;
/**
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
-
+
-
+
|
* \param obj The object whose index is returned
* \return The index of the first object that has the same aaddress as
* the specified object
*/
- (size_t)indexOfObjectIdenticalTo: (OFObject*)obj;
/**
* \return The first object of the OFArray or nil
* \return The first object of the array or nil
*/
- (id)firstObject;
/**
* \return The last object of the OFArray or nil
* \return The last object of the array or nil
*/
- (id)lastObject;
/**
* Creates a string by joining all objects of the array.
*
* \param separator The string with which the objects should be joined
|