168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
}
- (id)objectAtIndex: (size_t)index
{
return *((OFObject**)[array itemAtIndex: index]);
}
- (size_t)indexOfObject: (id)obj
{
id *objs = [array cArray];
size_t i, count = [array count];
if (objs == NULL)
return SIZE_MAX;
for (i = 0; i < count; i++)
if ([objs[i] isEqual: obj])
return i;
return SIZE_MAX;
}
- (size_t)indexOfObjectIdenticalTo: (id)obj
{
id *objs = [array cArray];
size_t i, count = [array count];
if (objs == NULL)
return SIZE_MAX;
|
|
|
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
}
- (id)objectAtIndex: (size_t)index
{
return *((OFObject**)[array itemAtIndex: index]);
}
- (size_t)indexOfObject: (OFObject*)obj
{
id *objs = [array cArray];
size_t i, count = [array count];
if (objs == NULL)
return SIZE_MAX;
for (i = 0; i < count; i++)
if ([objs[i] isEqual: obj])
return i;
return SIZE_MAX;
}
- (size_t)indexOfObjectIdenticalTo: (OFObject*)obj
{
id *objs = [array cArray];
size_t i, count = [array count];
if (objs == NULL)
return SIZE_MAX;
|
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
- (id)lastObject
{
id *last = [array lastItem];
return (last != NULL ? *last : nil);
}
- (BOOL)isEqual: (id)obj
{
OFObject **objs, **objs2;
size_t i, count, count2;
if (![obj isKindOfClass: [OFArray class]])
return NO;
count = [array count];
count2 = [obj count];
if (count != count2)
return NO;
objs = [array cArray];
objs2 = [obj cArray];
for (i = 0; i < count; i++)
if (![objs[i] isEqual: objs2[i]])
return NO;
return YES;
}
|
|
|
|
|
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
- (id)lastObject
{
id *last = [array lastItem];
return (last != NULL ? *last : nil);
}
- (BOOL)isEqual: (OFObject*)obj
{
OFObject **objs, **objs2;
size_t i, count, count2;
if (![obj isKindOfClass: [OFArray class]])
return NO;
count = [array count];
count2 = [(OFArray*)obj count];
if (count != count2)
return NO;
objs = [array cArray];
objs2 = [(OFArray*)obj cArray];
for (i = 0; i < count; i++)
if (![objs[i] isEqual: objs2[i]])
return NO;
return YES;
}
|
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
- addObject: (OFObject*)obj
atIndex: (size_t)index
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObject: (id)obj
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObjectIdenticalTo: (id)obj
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObjectAtIndex: (size_t)index
{
|
|
|
|
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
- addObject: (OFObject*)obj
atIndex: (size_t)index
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObject: (OFObject*)obj
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObjectIdenticalTo: (OFObject*)obj
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObjectAtIndex: (size_t)index
{
|