#import <CPMutableArray.h>
Instance Methods | |
(void) | - addObject: |
(void) | - addObjectsFromArray: |
(void) | - exchangeObjectAtIndex:withObjectAtIndex: |
(void) | - insertObject:atIndex: |
(CPUInteger) | - insertObject:inArraySortedByDescriptors: |
(void) | - insertObjects:atIndexes: |
(void) | - removeAllObjects |
(void) | - removeLastObject |
(void) | - removeObject: |
(void) | - removeObject:inRange: |
(void) | - removeObjectAtIndex: |
(void) | - removeObjectIdenticalTo: |
(void) | - removeObjectIdenticalTo:inRange: |
(void) | - removeObjectsAtIndexes: |
(void) | - removeObjectsInArray: |
(void) | - removeObjectsInRange: |
(void) | - replaceObjectAtIndex:withObject: |
(void) | - replaceObjectsAtIndexes:withObjects: |
(void) | - replaceObjectsInRange:withObjectsFromArray: |
(void) | - replaceObjectsInRange:withObjectsFromArray:range: |
(void) | - setArray: |
(void) | - sortUsingDescriptors: |
(void) | - sortUsingFunction:context: |
(void) | - sortUsingSelector: |
Class Methods | |
(CPArray) | + arrayWithCapacity: |
This class is just an empty subclass of CPArray. CPArray already implements mutable methods and this class only exists for source compatability.
Definition at line 2 of file CPMutableArray.h.
|
implementation |
Initializes an array able to store at least aCapacity
items. Because CPArray is backed by JavaScript arrays, this method ends up simply returning a regular array.
Adds anObject
to the end of the array.
anObject | the object to add to the array |
Definition at line 41 of file CPMutableArray.j.
|
implementation |
Adds the objects in anArray
to the receiver array.
anArray | the array of objects to add to the end of the receiver |
Definition at line 50 of file CPMutableArray.j.
|
implementation |
Creates an array able to store at least aCapacity
items. Because CPArray is backed by JavaScript arrays, this method ends up simply returning a regular array.
Definition at line 22 of file CPMutableArray.j.
|
implementation |
Swaps the elements at the two specified indices.
anIndex | the first index to swap from |
otherIndex | the second index to swap from |
Definition at line 323 of file CPMutableArray.j.
|
implementation |
Inserts an object into the receiver at the specified location.
anObject | the object to insert into the array |
anIndex | the location to insert anObject at |
Definition at line 64 of file CPMutableArray.j.
|
implementation |
Definition at line 94 of file CPMutableArray.j.
|
implementation |
Inserts the objects in the provided array into the receiver at the indexes specified.
objects | the objects to add to this array |
anIndexSet | the indices for the objects |
Definition at line 74 of file CPMutableArray.j.
|
implementation |
Removes all objects from this array.
Definition at line 199 of file CPMutableArray.j.
|
implementation |
Removes the last object from the array.
Definition at line 208 of file CPMutableArray.j.
|
implementation |
Removes all entries of anObject
from the array.
anObject | the object whose entries are to be removed |
Definition at line 217 of file CPMutableArray.j.
|
implementation |
Removes all entries of anObject
from the array, in the range specified by aRange
.
anObject | the object to remove |
aRange | the range to search in the receiver for the object |
Definition at line 227 of file CPMutableArray.j.
|
implementation |
Removes the object at anIndex
.
anIndex | the location of the element to be removed |
Definition at line 242 of file CPMutableArray.j.
|
implementation |
Remove all instances of anObject
from the array. The search for the object is done using ==
.
anObject | the object to remove |
Definition at line 267 of file CPMutableArray.j.
|
implementation |
Remove the first instance of anObject
from the array, within the range specified by aRange
. The search for the object is done using ==
.
anObject | the object to remove |
aRange | the range in the array to search for the object |
Definition at line 279 of file CPMutableArray.j.
|
implementation |
Removes the objects at the indices specified by CPIndexSet
.
anIndexSet | the indices of the elements to be removed from the array |
Definition at line 251 of file CPMutableArray.j.
|
implementation |
Remove the objects in anArray
from the receiver array.
anArray | the array of objects to remove from the receiver |
Definition at line 295 of file CPMutableArray.j.
|
implementation |
Removes all the objects in the specified range from the receiver.
aRange | the range of objects to remove |
Definition at line 308 of file CPMutableArray.j.
|
implementation |
Replaces the element at anIndex
with anObject
. The current element at position anIndex
will be removed from the array.
anIndex | the position in the array to place anObject |
Definition at line 127 of file CPMutableArray.j.
|
implementation |
Replace the elements at the indices specified by anIndexSet
with the objects in objects
.
anIndexSet | the set of indices to array positions that will be replaced |
objects | the array of objects to place in the specified indices |
Definition at line 138 of file CPMutableArray.j.
|
implementation |
Replaces some of the receiver's objects with the objects from anArray
. Specifically, the elements of the receiver in the range specified by aRange
.
aRange | the range of elements to be replaced in the receiver |
anArray | the array to retrieve objects for placement into the receiver |
Definition at line 177 of file CPMutableArray.j.
|
implementation |
Replaces some of the receiver's objects with objects from anArray
. Specifically, the elements of the receiver in the range specified by aRange
, with the elements of anArray
in the range specified by otherRange
.
aRange | the range of elements to be replaced in the receiver |
anArray | the array to retrieve objects for placement into the receiver |
otherRange | the range of objects in anArray to pull from for placement into the receiver |
Definition at line 158 of file CPMutableArray.j.
|
implementation |
Sets the contents of the receiver to be identical to the contents of anArray
.
anArray | the array of objects used to replace the receiver's objects |
Definition at line 186 of file CPMutableArray.j.
|
implementation |
Definition at line 334 of file CPMutableArray.j.
|
implementation |
Sorts the receiver array using a JavaScript function as a comparator, and a specified context.
aFunction | a JavaScript function that will be called to compare objects |
aContext | an object that will be passed to aFunction with comparison |
Definition at line 353 of file CPMutableArray.j.
|
implementation |
Sorts the receiver array using an Objective-J method as a comparator.
aSelector | the selector for the method to call for comparison |
Definition at line 362 of file CPMutableArray.j.