![]() |
API
0.9.6
|
A mutable array backed by a JavaScript Array.A mutable array class backed by a JavaScript Array. There is also a CPMutableArray class, but it is just a child class of this class with an empty implementation. All mutable functionality is implemented directly in CPArray. More...
#import <CPArray.h>
Class Methods | |
(id) | + alloc |
(id) | + array |
(id) | + arrayWithArray: |
(id) | + arrayWithObject: |
(id) | + arrayWithObjects: |
(id) | + arrayWithObjects:count: |
![]() | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(Class) | + class |
(void) | + exposeBinding: |
(void) | + initialize |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
Additional Inherited Members | |
![]() | |
Class | isa |
A mutable array backed by a JavaScript Array.
A mutable array class backed by a JavaScript Array. There is also a CPMutableArray class, but it is just a child class of this class with an empty implementation. All mutable functionality is implemented directly in CPArray.
|
implementation |
Raises an exception.
CPArray objects are not observable, so this method raises an exception when invoked on an CPArray object. Instead of observing a array, observe the ordered to-many relationship for which the array is the collection of related objects.
Provided by category CPArray(KeyValueObserving).
Definition at line 520 of file CPArray+KVO.j.
|
implementation |
Registers an observer to receive key value observer notifications for the specified key-path relative to the objects at the indexes.
Provided by category CPArray(KeyValueObserving).
Definition at line 539 of file CPArray+KVO.j.
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Returns a string formed by concatenating the objects in the receiver, with the specified separator string inserted between each part. If the element is a Objective-J object, then the -description
of that object will be used, otherwise the default JavaScript representation will be used.
aString | the separator that will separate each object string |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Provided by category CPArray(CPCoding).
|
implementation |
|
implementation |
|
implementation |
Provided by category CPArray(CPPredicate).
Definition at line 197 of file CPPredicate.j.
|
implementation |
Provided by category CPArray(CPPredicate).
Definition at line 213 of file CPPredicate.j.
|
implementation |
|
implementation |
|
implementation |
Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index)
CPNotFound to the sender. |
|
implementation |
Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index, context)
CPNotFound to the sender. |
context | An object that contains context information you want passed to the predicate function. |
|
implementation |
Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.
options | Specifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse. |
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index)
|
|
implementation |
Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.
options | Specifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse. |
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index, context)
|
context | An object that contains context information you want passed to the predicate function. |
|
implementation |
|
implementation |
Returns the index of anObject
in the array within aRange
. It first attempts to find a match using -isEqual
:, then ===
.
anObject | the object to search for |
aRange | the range to search within |
CPNotFound
if it was not found.
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index)
CPNotFound to the sender. |
CPNotFound
if there is no matching object.
|
implementation |
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index, context)
CPNotFound to the sender. |
context | An object that contains context information you want passed to the predicate function. |
CPNotFound
if there is no matching object.
|
implementation |
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
options | Specifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse. |
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index)
|
CPNotFound
if there is no matching object.
|
implementation |
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
options | Specifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse. |
predicate | The function to apply to objects of the array. The function should have the signature: function(object, index, context)
|
context | An object that contains context information you want passed to the predicate function. |
CPNotFound
if there is no matching object.
|
implementation |
|
implementation |
|
implementation |
Initializes a the array with the contents of anArray
and optionally performs a deep copy of the objects based on copyItems
.
anArray | the array to copy the data from |
shouldCopyItems | if YES , each object will be copied by having a -copy message sent to it, and the returned object will be added to the receiver. Otherwise, no copying will be performed. |
|
implementation |
|
implementation |
Provided by category CPArray(CPCoding).
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Creates a deep mutable copy of the receiver.
Reimplemented from CPObject.
Provided by category CPArray(CPMutableCopying).
Definition at line 372 of file CPMutableArray.j.
|
implementation |
|
implementation |
|
implementation |
Returns a new array subset formed by selecting the elements that have filename extensions from filterTypes
. Only elements that are of type CPString are candidates for inclusion in the returned array.
filterTypes | an array of CPString objects that contain file extensions (without the '.') |
|
implementation |
Raises an exception.
CPArray objects are not observable, so this method raises an exception when invoked on an CPArray object. Instead of observing a array, observe the ordered to-many relationship for which the array is the collection of related objects.
Reimplemented from CPObject.
Provided by category CPArray(KeyValueObserving).
Definition at line 531 of file CPArray+KVO.j.
|
implementation |
Removes anObserver from all key value observer notifications associated with the specified keyPath relative to the array’s objects at indexes.
Provided by category CPArray(KeyValueObserving).
Definition at line 554 of file CPArray+KVO.j.
|
implementation |
|
implementation |
Reimplemented from CPObject.
Provided by category CPArray(CPKeyValueCoding).
Definition at line 492 of file CPArray+KVO.j.
|
implementation |
Reimplemented from CPObject.
Provided by category CPArray(CPKeyValueCoding).
Definition at line 501 of file CPArray+KVO.j.
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Reimplemented from CPObject.
Provided by category CPArray(CPKeyValueCoding).
Definition at line 419 of file CPArray+KVO.j.
|
implementation |
Reimplemented from CPObject.
Provided by category CPArray(CPKeyValueCoding).
Definition at line 451 of file CPArray+KVO.j.