API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPArray Class Reference

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>

+ Inheritance diagram for CPArray:

Instance Methods

(void) - addObserver:forKeyPath:options:context:
 
(void) - addObserver:toObjectsAtIndexes:forKeyPath:options:context:
 
(CPArray- arrayByAddingObject:
 
(CPArray- arrayByAddingObjectsFromArray:
 
(CPString- componentsJoinedByString:
 
(BOOL) - containsObject:
 
(BOOL) - containsObjectIdenticalTo:
 
(id) - copy
 
(int) - count
 
(CPString- description
 
(void) - encodeWithCoder:
 
(void) - enumerateObjectsUsingBlock:
 
(void) - enumerateObjectsWithOptions:usingBlock:
 
(CPArray- filteredArrayUsingPredicate:
 
(void) - filterUsingPredicate:
 
(id) - firstObject
 
(id) - firstObjectCommonWithArray:
 
(CPIndexSet- indexesOfObjectsPassingTest:
 
(CPIndexSet- indexesOfObjectsPassingTest:context:
 
(CPIndexSet- indexesOfObjectsWithOptions:passingTest:
 
(CPIndexSet- indexesOfObjectsWithOptions:passingTest:context:
 
(CPUInteger) - indexOfObject:
 
(CPUInteger) - indexOfObject:inRange:
 
(CPUInteger) - indexOfObject:inSortedRange:options:usingComparator:
 
(CPUInteger) - indexOfObjectIdenticalTo:
 
(CPUInteger) - indexOfObjectIdenticalTo:inRange:
 
(unsigned) - indexOfObjectPassingTest:
 
(unsigned) - indexOfObjectPassingTest:context:
 
(unsigned) - indexOfObjectWithOptions:passingTest:
 
(unsigned) - indexOfObjectWithOptions:passingTest:context:
 
(id) - init
 
(id) - initWithArray:
 
(id) - initWithArray:copyItems:
 
(id) - initWithCapacity:
 
(id) - initWithCoder:
 
(id) - initWithObjects:
 
(id) - initWithObjects:count:
 
(BOOL) - isEqual:
 
(BOOL) - isEqualToArray:
 
(id) - lastObject
 
(void) - makeObjectsPerformSelector:
 
(void) - makeObjectsPerformSelector:withObject:
 
(void) - makeObjectsPerformSelector:withObjects:
 
(id) - mutableCopy
 
(id) - objectAtIndex:
 
(CPEnumerator- objectEnumerator
 
(CPArray- objectsAtIndexes:
 
(CPArray- pathsMatchingExtensions:
 
(void) - removeObserver:forKeyPath:
 
(void) - removeObserver:fromObjectsAtIndexes:forKeyPath:
 
(CPEnumerator- reverseObjectEnumerator
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(CPArray- sortedArrayUsingDescriptors:
 
(CPArray- sortedArrayUsingFunction:
 
(CPArray- sortedArrayUsingFunction:context:
 
(CPArray- sortedArrayUsingSelector:
 
(CPArray- subarrayWithRange:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(void) - dealloc
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(id) + alloc
 
(id) + array
 
(id) + arrayWithArray:
 
(id) + arrayWithObject:
 
(id) + arrayWithObjects:
 
(id) + arrayWithObjects:count:
 
- Class Methods inherited from CPObject
(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

- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

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.

Definition at line 2 of file CPArray.h.

Method Documentation

- (void) addObserver: (id)  anObserver
forKeyPath: (CPString aKeyPath
options: (CPKeyValueObservingOptions)  anOptions
context: (id)  aContext 
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.

- (void) addObserver: (id)  anObserver
toObjectsAtIndexes: (CPIndexSet indexes
forKeyPath: (CPString aKeyPath
options: (unsigned)  options
context: (id)  context 
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.

+ (id) alloc
implementation

Returns a new uninitialized CPArray.

Reimplemented from CPObject.

Definition at line 64 of file CPArray.j.

+ (id) array
implementation

Returns a new initialized CPArray.

Definition at line 75 of file CPArray.j.

- (CPArray) arrayByAddingObject: (id)  anObject
implementation

Returns a copy of this array plus anObject inside the copy.

Parameters
anObjectthe object to be added to the array copy
Exceptions
CPInvalidArgumentExceptionif anObject is nil
Returns
a new array that should be n+1 in size compared to the receiver.

Definition at line 734 of file CPArray.j.

- (CPArray) arrayByAddingObjectsFromArray: (CPArray anArray
implementation

Returns a new array which is the concatenation of self and otherArray (in this precise order).

Parameters
anArraythe array that will be concatenated to the receiver's copy

Definition at line 749 of file CPArray.j.

+ (id) arrayWithArray: (CPArray anArray
implementation

Creates a new array containing the objects in anArray.

Parameters
anArrayObjects in this array will be added to the new array
Returns
a new CPArray of the provided objects

Definition at line 85 of file CPArray.j.

+ (id) arrayWithObject: (id)  anObject
implementation

Creates a new array with anObject in it.

Parameters
anObjectthe object to be added to the array
Returns
a new CPArray containing a single object

Definition at line 95 of file CPArray.j.

+ (id) arrayWithObjects: (id)  anObject
,   ... 
implementation

Creates a new CPArray containing all the objects passed as arguments to the method.

Parameters
anObjectthe objects that will be added to the new array
Returns
a new CPArray containing the argument objects

Definition at line 105 of file CPArray.j.

+ (id) arrayWithObjects: (id)  objects
count: (unsigned)  aCount 
implementation

Creates a CPArray from a JavaScript array of objects.

Parameters
objectsthe JavaScript Array
aCountthe number of objects in the JS Array
Returns
a new CPArray containing the specified objects

Definition at line 119 of file CPArray.j.

- (CPString) componentsJoinedByString: (CPString aString
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.

Parameters
aStringthe separator that will separate each object string
Returns
the string representation of the array

Definition at line 859 of file CPArray.j.

- (BOOL) containsObject: (id)  anObject
implementation

Returns YES if the array contains anObject. Otherwise, it returns NO.

Parameters
anObjectthe method checks if this object is already in the array

Definition at line 187 of file CPArray.j.

- (BOOL) containsObjectIdenticalTo: (id)  anObject
implementation

Definition at line 192 of file CPArray.j.

- (id) copy
implementation

Makes a copy of the receiver.

Returns
a new CPArray copy

Reimplemented from CPObject.

Definition at line 919 of file CPArray.j.

- (int) count
implementation

Returns the number of elements in the array

Definition at line 200 of file CPArray.j.

- (CPString) description
implementation

Returns a human readable description of this array and it's elements.

Reimplemented from CPObject.

Definition at line 869 of file CPArray.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Provided by category CPArray(CPCoding).

Definition at line 933 of file CPArray.j.

- (void) enumerateObjectsUsingBlock: (Function /*(id anObject, int idx, @ref BOOL stop)*/)  aFunction
implementation

Definition at line 610 of file CPArray.j.

- (void) enumerateObjectsWithOptions: (CPEnumerationOptions)  options
usingBlock: (Function /*(id anObject, int idx, @ref BOOL stop)*/)  aFunction 
implementation

Definition at line 627 of file CPArray.j.

- (CPArray) filteredArrayUsingPredicate: (CPPredicate predicate
implementation

Provided by category CPArray(CPPredicate).

Definition at line 197 of file CPPredicate.j.

- (void) filterUsingPredicate: (CPPredicate predicate
implementation

Provided by category CPArray(CPPredicate).

Definition at line 213 of file CPPredicate.j.

- (id) firstObject
implementation

Returns the first object in the array. If the array is empty, returns nil

Definition at line 208 of file CPArray.j.

- (id) firstObjectCommonWithArray: (CPArray anArray
implementation

Returns the first object found in the receiver (starting at index 0) which is present in the otherArray as determined by using the -containsObject: method.

Returns
the first object found, or nil if no common object was found.

Definition at line 658 of file CPArray.j.

- (CPIndexSet) indexesOfObjectsPassingTest: (Function /*(id anObject, int idx)*/)  aPredicate
implementation

Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.

Parameters
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
Returns
A CPIndexSet of the matching object indexes.

Definition at line 492 of file CPArray.j.

- (CPIndexSet) indexesOfObjectsPassingTest: (Function /*(id anObject, int idx, id context)*/)  aPredicate
context: (id)  aContext 
implementation

Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.

Parameters
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index, context)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
contextAn object that contains context information you want passed to the predicate function.
Returns
A CPIndexSet of the matching object indexes.

Definition at line 506 of file CPArray.j.

- (CPIndexSet) indexesOfObjectsWithOptions: (CPEnumerationOptions)  options
passingTest: (Function /*(id anObject, int idx)*/)  aPredicate 
implementation

Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.

Parameters
optionsSpecifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse.
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
Returns
A CPIndexSet of the matching object indexes.

Definition at line 521 of file CPArray.j.

- (CPIndexSet) indexesOfObjectsWithOptions: (CPEnumerationOptions)  options
passingTest: (Function /*(id anObject, int idx, id context)*/)  aPredicate
context: (id)  aContext 
implementation

Returns the indexes of the objects in the receiver that pass a test in a given Javascript function.

Parameters
optionsSpecifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse.
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index, context)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
contextAn object that contains context information you want passed to the predicate function.
Returns
A CPIndexSet of the matching object indexes.

Definition at line 537 of file CPArray.j.

- (CPUInteger) indexOfObject: (id)  anObject
implementation

Returns the index of anObject in this array. If the object is not in the array, returns CPNotFound. It first attempts to find a match using -isEqual:, then ===.

Parameters
anObjectthe object to search for

Definition at line 283 of file CPArray.j.

- (CPUInteger) indexOfObject: (id)  anObject
inRange: (CPRange)  aRange 
implementation

Returns the index of anObject in the array within aRange. It first attempts to find a match using -isEqual:, then ===.

Parameters
anObjectthe object to search for
aRangethe range to search within
Returns
the index of the object, or CPNotFound if it was not found.

Definition at line 296 of file CPArray.j.

- (CPUInteger) indexOfObject: (id)  anObject
inSortedRange: (CPRange)  aRange
options: (CPBinarySearchingOptions)  options
usingComparator: (Function)  aComparator 
implementation

Definition at line 421 of file CPArray.j.

- (CPUInteger) indexOfObjectIdenticalTo: (id)  anObject
implementation

Returns the index of anObject in the array. The test for equality is done using only ===.

Parameters
anObjectthe object to search for
Returns
the index of the object in the array. CPNotFound if the object is not in the array.

Definition at line 319 of file CPArray.j.

- (CPUInteger) indexOfObjectIdenticalTo: (id)  anObject
inRange: (CPRange)  aRange 
implementation

Returns the index of anObject in the array within aRange. The test for equality is done using only ==.

Parameters
anObjectthe object to search for
aRangethe range to search within
Returns
the index of the object, or CPNotFound if it was not found.

Definition at line 332 of file CPArray.j.

- (unsigned) indexOfObjectPassingTest: (Function /*(id anObject, int idx)*/)  aPredicate
implementation

Returns the index of the first object in the receiver that passes a test in a given Javascript function.

Parameters
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
Returns
The index of the first matching object, or CPNotFound if there is no matching object.

Definition at line 352 of file CPArray.j.

- (unsigned) indexOfObjectPassingTest: (Function /*(id anObject, int idx, id context)*/)  aPredicate
context: (id)  aContext 
implementation

Returns the index of the first object in the receiver that passes a test in a given Javascript function.

Parameters
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index, context)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
contextAn object that contains context information you want passed to the predicate function.
Returns
The index of the first matching object, or CPNotFound if there is no matching object.

Definition at line 366 of file CPArray.j.

- (unsigned) indexOfObjectWithOptions: (CPEnumerationOptions)  options
passingTest: (Function /*(id anObject, int idx)*/)  aPredicate 
implementation

Returns the index of the first object in the receiver that passes a test in a given Javascript function.

Parameters
optionsSpecifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse.
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
Returns
The index of the first matching object, or CPNotFound if there is no matching object.

Definition at line 381 of file CPArray.j.

- (unsigned) indexOfObjectWithOptions: (CPEnumerationOptions)  options
passingTest: (Function /*(id anObject, int idx, id context)*/)  aPredicate
context: (id)  aContext 
implementation

Returns the index of the first object in the receiver that passes a test in a given Javascript function.

Parameters
optionsSpecifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards or CPEnumerationReverse to search in reverse.
predicateThe function to apply to objects of the array. The function should have the signature:
function(object, index, context)
The predicate function should either return a Boolean value that indicates whether the object passed the test, or nil to stop the search, which will return CPNotFound to the sender.
contextAn object that contains context information you want passed to the predicate function.
Returns
The index of the first matching object, or CPNotFound if there is no matching object.

Definition at line 397 of file CPArray.j.

- (id) init
implementation

Initializes the CPArray.

Returns
the initialized array

Reimplemented from CPObject.

Definition at line 128 of file CPArray.j.

- (id) initWithArray: (CPArray anArray
implementation

Creates a new CPArray from anArray.

Parameters
anArrayobjects in this array will be added to the new array
Returns
a new CPArray containing the objects of anArray

Definition at line 139 of file CPArray.j.

- (id) initWithArray: (CPArray anArray
copyItems: (BOOL)  shouldCopyItems 
implementation

Initializes a the array with the contents of anArray and optionally performs a deep copy of the objects based on copyItems.

Parameters
anArraythe array to copy the data from
shouldCopyItemsif 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.
Returns
the initialized array of objects

Definition at line 152 of file CPArray.j.

- (id) initWithCapacity: (unsigned)  aCapacity
implementation

Definition at line 177 of file CPArray.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Provided by category CPArray(CPCoding).

Definition at line 928 of file CPArray.j.

- (id) initWithObjects: (id)  anObject
,   ... 
implementation

initializes an array with the contents of anArray

Definition at line 160 of file CPArray.j.

- (id) initWithObjects: (id)  objects
count: (unsigned)  aCount 
implementation

Initializes the array with a JavaScript array of objects.

Parameters
objectsthe array of objects to add to the receiver
aCountthe number of objects in objects
Returns
the initialized CPArray

Definition at line 171 of file CPArray.j.

- (BOOL) isEqual: (id)  anObject
implementation

Determines if anObject is functionally equivalent to the receiver.

Returns
YES if anObject is functionally equivalent to the receiver.

Reimplemented from CPObject.

Definition at line 710 of file CPArray.j.

- (BOOL) isEqualToArray: (id)  anArray
implementation

Returns true if anArray contains exactly the same objects as the receiver.

Definition at line 681 of file CPArray.j.

- (id) lastObject
implementation

Returns the last object in the array. If the array is empty, returns nil

Definition at line 221 of file CPArray.j.

- (void) makeObjectsPerformSelector: (SEL)  aSelector
implementation

Sends each element in the array a message.

Parameters
aSelectorthe selector of the message to send
Exceptions
CPInvalidArgumentExceptionif aSelector is nil

Definition at line 569 of file CPArray.j.

- (void) makeObjectsPerformSelector: (SEL)  aSelector
withObject: (id)  anObject 
implementation

Sends each element in the array a message with an argument.

Parameters
aSelectorthe selector of the message to send
anObjectthe first argument of the message
Exceptions
CPInvalidArgumentExceptionif aSelector is nil

Definition at line 580 of file CPArray.j.

- (void) makeObjectsPerformSelector: (SEL)  aSelector
withObjects: (CPArray objects 
implementation

Definition at line 585 of file CPArray.j.

- (id) mutableCopy
implementation

Creates a deep mutable copy of the receiver.

Returns
the mutable copy of the receiver

Reimplemented from CPObject.

Provided by category CPArray(CPMutableCopying).

Definition at line 372 of file CPMutableArray.j.

- (id) objectAtIndex: (int)  anIndex
implementation

Returns the object at index anIndex.

Exceptions
CPRangeExceptionif anIndex is out of bounds

Definition at line 235 of file CPArray.j.

- (CPEnumerator) objectEnumerator
implementation

Returns an enumerator describing the array sequentially from the first to the last element. You should not modify the array during enumeration.

Definition at line 261 of file CPArray.j.

- (CPArray) objectsAtIndexes: (CPIndexSet indexes
implementation

Returns the objects at indexes in a new CPArray.

Parameters
indexesthe set of indices
Exceptions
CPRangeExceptionif any of the indices is greater than or equal to the length of the array

Definition at line 245 of file CPArray.j.

- (CPArray) pathsMatchingExtensions: (CPArray filterTypes
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.

Parameters
filterTypesan array of CPString objects that contain file extensions (without the '.')
Returns
a new array with matching paths

Definition at line 900 of file CPArray.j.

- (void) removeObserver: (id)  anObserver
forKeyPath: (CPString aKeyPath 
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.

- (void) removeObserver: (id)  anObserver
fromObjectsAtIndexes: (CPIndexSet indexes
forKeyPath: (CPString aKeyPath 
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.

- (CPEnumerator) reverseObjectEnumerator
implementation

Returns an enumerator describing the array sequentially from the last to the first element. You should not modify the array during enumeration.

Definition at line 271 of file CPArray.j.

- (void) setValue: (id)  aValue
forKey: (CPString aKey 
implementation

Reimplemented from CPObject.

Provided by category CPArray(CPKeyValueCoding).

Definition at line 492 of file CPArray+KVO.j.

- (void) setValue: (id)  aValue
forKeyPath: (CPString aKeyPath 
implementation

Reimplemented from CPObject.

Provided by category CPArray(CPKeyValueCoding).

Definition at line 501 of file CPArray+KVO.j.

- (CPArray) sortedArrayUsingDescriptors: (CPArray descriptors
implementation

Definition at line 802 of file CPArray.j.

- (CPArray) sortedArrayUsingFunction: (Function)  aFunction
implementation

Return a copy of the receiver sorted using the function passed into the first parameter.

Definition at line 814 of file CPArray.j.

- (CPArray) sortedArrayUsingFunction: (Function)  aFunction
context: (id)  aContext 
implementation

Returns an array in which the objects are ordered according to a sort with aFunction. This invokes -sortUsingFunction:context.

Parameters
aFunctiona JavaScript 'Function' type that compares objects
aContextcontext information
Returns
a new sorted array

Definition at line 827 of file CPArray.j.

- (CPArray) sortedArrayUsingSelector: (SEL)  aSelector
implementation

Returns a new array in which the objects are ordered according to a sort with aSelector.

Parameters
aSelectorthe selector that will perform object comparisons

Definition at line 840 of file CPArray.j.

- (CPArray) subarrayWithRange: (CPRange)  aRange
implementation

Returns a subarray of the receiver containing the objects found in the specified range aRange.

Parameters
aRangethe range of objects to be copied into the subarray
Exceptions
CPRangeExceptionif the specified range exceeds the bounds of the array

Definition at line 780 of file CPArray.j.

- (id) valueForKey: (CPString aKey
implementation

Reimplemented from CPObject.

Provided by category CPArray(CPKeyValueCoding).

Definition at line 419 of file CPArray+KVO.j.

- (id) valueForKeyPath: (CPString aKeyPath
implementation

Reimplemented from CPObject.

Provided by category CPArray(CPKeyValueCoding).

Definition at line 451 of file CPArray+KVO.j.


The documentation for this class was generated from the following files: