An abstract class for storing, adding and removing objects in anr array. More...
#import <OFMutableArray.h>
Instance Methods | |
(void) | - addObject: |
Adds an object to the end of the array. | |
(void) | - addObjectsFromArray: |
Adds the objects from the specified OFArray to the end of the array. | |
(void) | - insertObject:atIndex: |
Inserts an object to the OFArray at the specified index. | |
(void) | - insertObjectsFromArray:atIndex: |
Inserts the objects from the specified OFArray at the specified index. | |
(void) | - replaceObject:withObject: |
Replaces the first object equivalent to the specified object with the other specified object. | |
(void) | - replaceObjectAtIndex:withObject: |
Replaces the object at the specified index with the specified object. | |
(void) | - replaceObjectIdenticalTo:withObject: |
Replaces the first object that has the same address as the specified object with the other specified object. | |
(void) | - removeObject: |
Removes the first object equivalent to the specified object. | |
(void) | - removeObjectIdenticalTo: |
Removes the first object that has the same address as the specified object. | |
(void) | - removeObjectAtIndex: |
Removes the object at the specified index. | |
(void) | - removeObjectsInRange: |
Removes the object in the specified range. | |
(void) | - removeLastObject |
Removes the last object. | |
(void) | - removeAllObjects |
Removes all objects. | |
(void) | - exchangeObjectAtIndex:withObjectAtIndex: |
Exchange the objects at the specified indices. | |
(void) | - sort |
Sorts the array. | |
(void) | - reverse |
Reverts the order of the objects in the array. | |
(void) | - makeImmutable |
Converts the mutable array to an immutable array. | |
Instance Methods inherited from OFArray | |
(id) | - initWithObject: |
Initializes an OFArray with the specified object. | |
(id) | - initWithObjects: |
Initializes an OFArray with the specified objects. | |
(id) | - initWithObject:arguments: |
Initializes an OFArray with the specified object and a va_list. | |
(id) | - initWithArray: |
Initializes an OFArray with the objects from the specified array. | |
(id) | - initWithObjects:count: |
Initializes an OFArray with the objects from the specified C array of the specified length. | |
(id) | - objectAtIndex: |
Returns a specified object of the array. | |
(void) | - getObjects:inRange: |
Copies the objects at the specified range to the specified buffer. | |
(id *) | - objects |
Returns the objects of the array as a C array. | |
(size_t) | - indexOfObject: |
Returns the index of the first object that is equivalent to the specified object or OF_NOT_FOUND if it was not found. | |
(size_t) | - indexOfObjectIdenticalTo: |
Returns the index of the first object that has the same address as the specified object or OF_NOT_FOUND if it was not found. | |
(BOOL) | - containsObjectIdenticalTo: |
Checks whether the array contains an object with the specified address. | |
(id) | - firstObject |
Returns the first object of the array or nil. | |
(id) | - lastObject |
Returns the last object of the array or nil. | |
(OFArray *) | - objectsInRange: |
Returns the objects in the specified range as a new OFArray. | |
(OFString *) | - componentsJoinedByString: |
Creates a string by joining all objects of the array. | |
(OFString *) | - componentsJoinedByString:usingSelector: |
Creates a string by calling the selector on all objects of the array and joining the strings returned by calling the selector. | |
(void) | - makeObjectsPerformSelector: |
Performs the specified selector on all objects in the array. | |
(void) | - makeObjectsPerformSelector:withObject: |
Performs the specified selector on all objects in the array with the specified object. | |
(OFArray *) | - sortedArray |
Returns a sorted copy of the array. | |
(OFArray *) | - reversedArray |
Returns a copy of the array with the order reversed. | |
(OFArray *) | - arrayByAddingObject: |
Creates a new array with the specified object added. | |
(OFArray *) | - arrayByAddingObjectsFromArray: |
Creates a new array with the objects from the specified array added. | |
(OFArray *) | - arrayByRemovingObject: |
Creates a new array with the specified object removed. | |
Instance Methods inherited from OFObject | |
(id) | - init |
Initializes an already allocated object. | |
(OFString *) | - className |
Returns the name of the object's class. | |
(OFString *) | - description |
Returns a description for the object. | |
(void *) | - allocMemoryWithSize: |
Allocates memory and stores it in the object's memory pool. | |
(void *) | - allocMemoryWithSize:count: |
Allocates memory for the specified number of items and stores it in the object's memory pool. | |
(void *) | - resizeMemory:size: |
Resizes memory in the object's memory pool to the specified size. | |
(void *) | - resizeMemory:size:count: |
Resizes memory in the object's memory pool to the specific number of items of the specified size. | |
(void) | - freeMemory: |
Frees allocated memory and removes it from the object's memory pool. | |
(void) | - dealloc |
Deallocates the object. | |
(void) | - performSelector:afterDelay: |
Performs the specified selector after the specified delay. | |
(void) | - performSelector:withObject:afterDelay: |
Performs the specified selector with the specified object after the specified delay. | |
(void) | - performSelector:withObject:withObject:afterDelay: |
Performs the specified selector with the specified objects after the specified delay. | |
(void) | - performSelector:onThread:waitUntilDone: |
Performs the specified selector on the specified thread. | |
(void) | - performSelector:onThread:withObject:waitUntilDone: |
Performs the specified selector on the specified thread with the specified object. | |
(void) | - performSelector:onThread:withObject:withObject:waitUntilDone: |
Performs the specified selector on the specified thread with the specified objects. | |
(void) | - performSelectorOnMainThread:waitUntilDone: |
Performs the specified selector on the main thread. | |
(void) | - performSelectorOnMainThread:withObject:waitUntilDone: |
Performs the specified selector on the main thread with the specified object. | |
(void) | - performSelectorOnMainThread:withObject:withObject:waitUntilDone: |
Performs the specified selector on the main thread with the specified objects. | |
(void) | - performSelector:onThread:afterDelay: |
Performs the specified selector on the specified thread after the specified delay. | |
(void) | - performSelector:onThread:withObject:afterDelay: |
Performs the specified selector on the specified thread with the specified object after the specified delay. | |
(void) | - performSelector:onThread:withObject:withObject:afterDelay: |
Performs the specified selector on the specified thread with the specified objects after the specified delay. | |
(OFString *) | - stringBySerializing |
Creates a string by serializing the receiver. | |
Instance Methods inherited from <OFObject> | |
(BOOL) | - isKindOfClass: |
Returns a boolean whether the object of the specified kind. | |
(BOOL) | - isMemberOfClass: |
Returns a boolean whether the object is a member of the specified class. | |
(BOOL) | - respondsToSelector: |
Returns a boolean whether the object responds to the specified selector. | |
(IMP) | - methodForSelector: |
Returns the implementation for the specified selector. | |
(const char *) | - typeEncodingForSelector: |
Returns the type encoding for the specified selector. | |
(id) | - performSelector: |
Performs the specified selector. | |
(id) | - performSelector:withObject: |
Performs the specified selector with the specified object. | |
(id) | - performSelector:withObject:withObject: |
Performs the specified selector with the specified objects. | |
(BOOL) | - isEqual: |
Checks two objects for equality. | |
(uint32_t) | - hash |
Calculates a hash for the object. | |
(id) | - retain |
Increases the retain count. | |
(unsigned int) | - retainCount |
Returns the retain count. | |
(void) | - release |
Decreases the retain count. | |
(id) | - autorelease |
Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack. | |
(id) | - self |
Returns the receiver. | |
(BOOL) | - isProxy |
Returns whether the object is a proxy object. | |
Instance Methods inherited from <OFCopying> | |
(id) | - copy |
Copies the object. | |
Instance Methods inherited from <OFMutableCopying> | |
(id) | - mutableCopy |
Creates a mutable copy of the object. | |
Instance Methods inherited from <OFCollection> | |
(size_t) | - count |
Returns the number of objects in the collection. | |
(BOOL) | - containsObject: |
Checks whether the collection contains an object equal to the specified object. | |
Instance Methods inherited from <OFEnumerating> | |
(OFEnumerator *) | - objectEnumerator |
Returns an OFEnumerator to enumerate through all objects of the collection. | |
Instance Methods inherited from <OFFastEnumeration> | |
(int) | - countByEnumeratingWithState:objects:count: |
A method which is called by the code produced by the compiler when doing a fast enumeration. | |
Instance Methods inherited from <OFSerialization> | |
(id) | - initWithSerialization: |
Initializes the object with the specified XML element serialization. | |
(OFXMLElement *) | - XMLElementBySerializing |
Serializes the object into an XML element. | |
Instance Methods inherited from <OFJSONRepresentation> | |
(OFString *) | - JSONRepresentation |
Returns the JSON representation of the object as a string. | |
Additional Inherited Members | |
Class Methods inherited from OFArray | |
(instancetype) | + array |
Creates a new OFArray. | |
(instancetype) | + arrayWithObject: |
Creates a new OFArray with the specified object. | |
(instancetype) | + arrayWithObjects: |
Creates a new OFArray with the specified objects, terminated by nil. | |
(instancetype) | + arrayWithArray: |
Creates a new OFArray with the objects from the specified array. | |
(instancetype) | + arrayWithObjects:count: |
Creates a new OFArray with the objects from the specified C array of the specified length. | |
Public Attributes inherited from OFObject | |
Class | isa |
The class of the object. | |
An abstract class for storing, adding and removing objects in anr array.
- (void) addObject: | (id) | object |
Adds an object to the end of the array.
object | An object to add |
- (void) addObjectsFromArray: | (OFArray*) | array |
Adds the objects from the specified OFArray to the end of the array.
array An array of objects to add
- (void) exchangeObjectAtIndex: | (size_t) | index1 | |
withObjectAtIndex: | (size_t) | index2 | |
Exchange the objects at the specified indices.
index1 | The index of the first object to exchange |
index2 | The index of the second object to exchange |
- (void) insertObject: | (id) | object | |
atIndex: | (size_t) | index | |
Inserts an object to the OFArray at the specified index.
object | An object to add |
index | The index where the object should be inserted |
- (void) insertObjectsFromArray: | (OFArray*) | array | |
atIndex: | (size_t) | index | |
Inserts the objects from the specified OFArray at the specified index.
array | An array of objects |
index | The index where the objects should be inserted |
- (void) removeObject: | (id) | object |
Removes the first object equivalent to the specified object.
object | The object to remove |
- (void) removeObjectAtIndex: | (size_t) | index |
Removes the object at the specified index.
index | The index of the object to remove |
- (void) removeObjectIdenticalTo: | (id) | object |
Removes the first object that has the same address as the specified object.
object | The object to remove |
- (void) removeObjectsInRange: | (of_range_t) | range |
Removes the object in the specified range.
range | The range of the objects to remove |
- (void) replaceObject: | (id) | oldObject | |
withObject: | (id) | newObject | |
Replaces the first object equivalent to the specified object with the other specified object.
oldObject | The object to replace |
newObject | The replacement object |
- (void) replaceObjectAtIndex: | (size_t) | index | |
withObject: | (id) | object | |
Replaces the object at the specified index with the specified object.
index | The index of the object to replace |
object | The replacement object |
- (void) replaceObjectIdenticalTo: | (id) | oldObject | |
withObject: | (id) | newObject | |
Replaces the first object that has the same address as the specified object with the other specified object.
oldObject | The object to replace |
newObject | The replacement object |