- Inherits From:
- Declared In:
unsigned int pageSize;
pageTable All instance variables are private. pageSize
Creating sparse cluster arrays
Adding and removing objects
- - init
Querying the array
- - setObject:atIndex:
- - removeObjectAtIndex:
- - objectAtIndex:
- - count
- - indexEnumerator
- - allObjects
- (NSArray *)allObjects
Returns an array containing the receiver's objects, or an empty array if the receiver has no objects. The order of the objects in the array is the same as in the receiver.
- (unsigned int)count
Returns the number of objects in the receiver.
- (NSEnumerator *)indexEnumerator
Returns an enumerator object that lets you access all indeces for occupied slots in the receiver, in order, starting with the smallest index. You should not modify the receiver while using the enumerator. For a more detailed explanation and sample code see the description of keyEnumerator in NSDictionary.
Initialises a newly allocated sparse cluster array.
- (id)objectAtIndex:(unsigned int)index
Returns the object located at index, or
nil if the slot was empty.
- (void)removeObjectAtIndex:(unsigned int)index
Removes the object stored in slot index from the receiver. The object receives a release message.
This method raises an NSInvalidArgumentException if the slot was empty.
- (void)setObject:(id)anObject atIndex:(unsigned int)index
Stores anObject in the slot index of the receiver. Index can be arbitrarily large without affecting performance. The object receives a retain message.
If the slot is already occupied, the object at the index is removed and receives a release message.
This method raises an NSInvalidArgumentException if anObject is