CPArray(CPMutableArray) Class Reference
List of all members.
Detailed Description
Definition at line 873 of file CPArray.j.
Member Function Documentation
- (void) addObject: |
|
(id) |
anObject |
|
[implementation] |
Adds anObject
to the end of the array.
- Parameters:
-
| anObject | the object to add to the array |
Definition at line 900 of file CPArray.j.
- (void) addObjectsFromArray: |
|
(CPArray) |
anArray |
|
[implementation] |
Adds the objects in anArray
to the receiver array.
- Parameters:
-
| anArray | the array of objects to add to the end of the receiver |
Definition at line 909 of file CPArray.j.
+ (CPArray) arrayWithCapacity: |
|
(unsigned) |
aCapacity |
|
[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 881 of file CPArray.j.
- (void) exchangeObjectAtIndex: |
|
(unsigned) |
anIndex |
withObjectAtIndex: |
|
(unsigned) |
otherIndex | |
|
|
| | [implementation] |
Swaps the elements at the two specified indices.
- Parameters:
-
| anIndex | the first index to swap from |
| otherIndex | the second index to swap from |
Definition at line 1138 of file CPArray.j.
- (id) initWithCapacity: |
|
(unsigned) |
aCapacity |
|
[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.
Definition at line 890 of file CPArray.j.
- (void) insertObject: |
|
(id) |
anObject |
atIndex: |
|
(int) |
anIndex | |
|
|
| | [implementation] |
Inserts an object into the receiver at the specified location.
- Parameters:
-
| anObject | the object to insert into the array |
| anIndex | the location to insert anObject at |
Definition at line 919 of file CPArray.j.
- (void) insertObjects: |
|
(CPArray) |
objects |
atIndexes: |
|
(CPIndexSet) |
indexes | |
|
|
| | [implementation] |
Inserts the objects in the provided array into the receiver at the indexes specified.
- Parameters:
-
| objects | the objects to add to this array |
| anIndexSet | the indices for the objects |
Definition at line 929 of file CPArray.j.
- (void) removeAllObjects |
|
|
|
[implementation] |
Removes all objects from this array.
Definition at line 1020 of file CPArray.j.
- (void) removeLastObject |
|
|
|
[implementation] |
Removes the last object from the array.
Definition at line 1028 of file CPArray.j.
- (void) removeObject: |
|
(id) |
anObject |
|
[implementation] |
Removes all entries of anObject
from the array.
- Parameters:
-
| anObject | the object whose entries are to be removed |
Definition at line 1037 of file CPArray.j.
- (void) removeObject: |
|
(id) |
anObject |
inRange: |
|
(CPRange) |
aRange | |
|
|
| | [implementation] |
Removes all entries of anObject
from the array, in the range specified by aRange
.
- Parameters:
-
| anObject | the object to remove |
| aRange | the range to search in the receiver for the object |
Definition at line 1047 of file CPArray.j.
- (void) removeObjectAtIndex: |
|
(int) |
anIndex |
|
[implementation] |
Removes the object at anIndex
.
- Parameters:
-
| anIndex | the location of the element to be removed |
Definition at line 1062 of file CPArray.j.
- (void) removeObjectIdenticalTo: |
|
(id) |
anObject |
|
[implementation] |
Remove the first instance of anObject
from the array. The search for the object is done using ==
.
- Parameters:
-
| anObject | the object to remove |
Definition at line 1087 of file CPArray.j.
- (void) removeObjectIdenticalTo: |
|
(id) |
anObject |
inRange: |
|
(CPRange) |
aRange | |
|
|
| | [implementation] |
Remove the first instance of anObject
from the array, within the range specified by aRange
. The search for the object is done using ==
.
- Parameters:
-
| anObject | the object to remove |
| aRange | the range in the array to search for the object |
Definition at line 1099 of file CPArray.j.
- (void) removeObjectsAtIndexes: |
|
(CPIndexSet) |
anIndexSet |
|
[implementation] |
Removes the objects at the indices specified by CPIndexSet
.
- Parameters:
-
| anIndexSet | the indices of the elements to be removed from the array |
Definition at line 1071 of file CPArray.j.
- (void) removeObjectsInArray: |
|
(CPArray) |
anArray |
|
[implementation] |
Remove the objects in anArray
from the receiver array.
- Parameters:
-
| anArray | the array of objects to remove from the receiver |
Definition at line 1114 of file CPArray.j.
- (void) removeObjectsInRange: |
|
(CPRange) |
aRange |
|
[implementation] |
Removes all the objects in the specified range from the receiver.
- Parameters:
-
| aRange | the range of objects to remove |
Definition at line 1127 of file CPArray.j.
- (void) replaceObjectAtIndex: |
|
(int) |
anIndex |
withObject: |
|
(id) |
anObject | |
|
|
| | [implementation] |
Replaces the element at anIndex
with anObject
. The current element at position anIndex
will be removed from the array.
- Parameters:
-
| anIndex | the position in the array to place anObject |
Definition at line 954 of file CPArray.j.
- (void) replaceObjectsAtIndexes: |
|
(CPIndexSet) |
anIndexSet |
withObjects: |
|
(CPArray) |
objects | |
|
|
| | [implementation] |
Replace the elements at the indices specified by anIndexSet
with the objects in objects
.
- Parameters:
-
| 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 965 of file CPArray.j.
- (void) replaceObjectsInRange: |
|
(CPRange) |
aRange |
withObjectsFromArray: |
|
(CPArray) |
anArray | |
|
|
| | [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
.
- Parameters:
-
| 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 1000 of file CPArray.j.
- (void) replaceObjectsInRange: |
|
(CPRange) |
aRange |
withObjectsFromArray: |
|
(CPArray) |
anArray |
range: |
|
(CPRange) |
otherRange | |
|
|
| | [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
.
- Parameters:
-
| 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 985 of file CPArray.j.
- (void) setArray: |
|
(CPArray) |
anArray |
|
[implementation] |
Sets the contents of the receiver to be identical to the contents of anArray
.
- Parameters:
-
| anArray | the array of objects used to replace the receiver's objects |
Definition at line 1009 of file CPArray.j.
- (CPArray) sortUsingDescriptors: |
|
(CPArray) |
descriptors |
|
[implementation] |
- (void) sortUsingFunction: |
|
(Function) |
aFunction |
context: |
|
(id) |
aContext | |
|
|
| | [implementation] |
Sorts the receiver array using a JavaScript function as a comparator, and a specified context.
- Parameters:
-
| 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 1166 of file CPArray.j.
- (void) sortUsingSelector: |
|
(SEL) |
aSelector |
|
[implementation] |
Sorts the receiver array using an Objective-J method as a comparator.
- Parameters:
-
| aSelector | the selector for the method to call for comparison |
Definition at line 1175 of file CPArray.j.
The documentation for this class was generated from the following file: