#import <CPSet.h>
Definition at line 2 of file CPSet.h.
Returns an array containing the receiver’s members, or an empty array if the receiver has no members.
Definition at line 215 of file CPSet.j.
Allocates a new instance of the receiving class
Reimplemented from CPObject.
Definition at line 40 of file CPSet.j.
Returns one of the objects in the receiver, or nil if the receiver contains no objects.
Definition at line 230 of file CPSet.j.
- (BOOL) containsObject: |
|
(id) |
anObject |
|
|
implementation |
Returns a Boolean value that indicates whether a given object is present in the receiver.
- Parameters
-
anObject | The object for which to test membership of the receiver. |
Definition at line 239 of file CPSet.j.
Makes a deep copy of the receiver. The copy should be functionally equivalent to the receiver.
- Returns
- the copy of the receiver
Reimplemented from CPObject.
Provided by category CPSet(CPCopying).
Definition at line 432 of file CPSet.j.
Returns the number of members in the receiver.
Definition at line 207 of file CPSet.j.
Returns a human readable string describing the receiver
Reimplemented from CPObject.
Definition at line 411 of file CPSet.j.
- (void) encodeWithCoder: |
|
(CPCoder) |
aCoder |
|
|
implementation |
- (void) enumerateObjectsUsingBlock: |
|
(Function) |
aFunction |
|
|
implementation |
Enumberates over the objects in a set using a given function.
- Parameters
-
aFunction | a callback for each itteration, should be of the format: function(anObject). |
Definition at line 319 of file CPSet.j.
Returns a set filtered using a given predicate. aPredicate a CPPredicate object used to filter the objects in the set.
Provided by category CPSet(CPPredicate).
Definition at line 248 of file CPSet.j.
Basic initializer, returns an empty set.
Reimplemented from CPObject.
Definition at line 138 of file CPSet.j.
- (id) initWithArray: |
|
(CPArray) |
anArray |
|
|
implementation |
Initializes a newly allocated set with the objects that are contained in a given array.
- Parameters
-
array | An array of objects to add to the new set. If the same object appears more than once in array, it is represented only once in the returned set. |
Definition at line 147 of file CPSet.j.
- (id) initWithCoder: |
|
(CPCoder) |
aCoder |
|
|
implementation |
- (id) initWithObjects: |
|
(id) |
anObject |
, |
|
|
... |
|
|
| |
|
implementation |
Initializes a newly allocated set with members taken from the specified list of objects.
- Parameters
-
anObject | The first object to add to the new set. |
... | A comma-separated list of objects, ending with nil, to add to the new set. If the same object appears more than once in the list, it is represented only once in the returned set. |
Definition at line 157 of file CPSet.j.
Creates and returns a set containing the objects from an array.
- Parameters
-
anArray | An array containing the objects to add to the new set. |
aCount | the number of objects in anArray. |
Definition at line 174 of file CPSet.j.
- (id) initWithSet: |
|
(CPSet) |
aSet |
|
|
implementation |
Initializes a newly allocated set and adds to it objects from another given set.
- Parameters
-
aSet | a set containing objects to add to the new set. |
Definition at line 186 of file CPSet.j.
Initializes a newly allocated set and adds to it members of another given set. Only included for compatability.
- Parameters
-
aSet | a set of objects to add to the new set. |
shouldCopyItems | a boolean value. If YES the objects would be copied, if NO the objects will not be copied. |
Definition at line 196 of file CPSet.j.
- (BOOL) intersectsSet: |
|
(CPSet) |
aSet |
|
|
implementation |
Returns a Boolean value that indicates whether at least one object in the receiver is also present in another given set.
- Parameters
-
set | The set with which to compare the receiver. |
Definition at line 363 of file CPSet.j.
- (BOOL) isEqual: |
|
(CPSet) |
aSet |
|
|
implementation |
Returns YES if BOTH sets are a subset of the other.
- Parameters
-
Definition at line 402 of file CPSet.j.
- (BOOL) isEqualToSet: |
|
(CPSet) |
aSet |
|
|
implementation |
Compares the receiver to another set.
- Parameters
-
set | The set with which to compare the receiver. |
Definition at line 393 of file CPSet.j.
- (BOOL) isSubsetOfSet: |
|
(CPSet) |
aSet |
|
|
implementation |
Returns a Boolean value that indicates whether every object in the receiver is also present in another given set.
- Parameters
-
set | The set with which to compare the receiver. |
Definition at line 347 of file CPSet.j.
- (void) makeObjectsPerformSelector: |
|
(SEL) |
aSelector |
|
|
implementation |
Sends to each object in the receiver a message specified by a given selector.
- Parameters
-
aSelector | A selector that specifies the message to send to the members of the receiver. The method must not take any arguments. It should not have the side effect of modifying the receiver. This value must not be NULL. |
Definition at line 265 of file CPSet.j.
Sends to each object in the receiver a message specified by a given selector.
- Parameters
-
aSelector | A selector that specifies the message to send to the receiver's members. The method must take a single argument of type id. The method should not, as a side effect, modify the receiver. The value must not be NULL. |
anObject | The object to pass as an argument to the method specified by aSelector. |
Definition at line 275 of file CPSet.j.
Sends to each object in the receiver a message specified by a given selector.
- Parameters
-
aSelector | A selector that specifies the message to send to the receiver's members. The method must take a single argument of type id. The method should not, as a side effect, modify the receiver. The value must not be NULL. |
objects | The objects to pass as an argument to the method specified by aSelector. |
Definition at line 285 of file CPSet.j.
- (id) member: |
|
(id) |
anObject |
|
|
implementation |
Determines whether the receiver contains an object equal to a given object, and returns that object if it is present.
- Parameters
-
anObject | The object for which to test for membership of the receiver. |
Definition at line 302 of file CPSet.j.
Creates a deep mutable copy of the receiver.
- Returns
- the mutable copy of the receiver
Reimplemented from CPObject.
Provided by category CPSet(CPCopying).
Definition at line 437 of file CPSet.j.
- (CPSet) objectsPassingTest: |
|
(Function) |
aFunction |
|
|
implementation |
Creates and returns an empty set.
Definition at line 51 of file CPSet.j.
- (id) setByAddingObject: |
|
(id) |
anObject |
|
|
implementation |
Creates and returns a set by adding anObject.
- Parameters
-
anObject | to add to the new set. |
Definition at line 112 of file CPSet.j.
- (id) setByAddingObjectsFromArray: |
|
(CPArray) |
anArray |
|
|
implementation |
Creates and returns a set by adding the objects from an array.
- Parameters
-
anArray | with objects to add to a new set. |
Definition at line 130 of file CPSet.j.
- (id) setByAddingObjectsFromSet: |
|
(CPSet) |
aSet |
|
|
implementation |
Creates and returns a set by adding the objects from another set.
- Parameters
-
aSet | to add objects to add to the new set. |
Definition at line 121 of file CPSet.j.
- (void) setValue: |
|
(id) |
aValue |
forKey: |
|
(CPString) |
aKey |
|
|
| |
|
implementation |
+ (id) setWithArray: |
|
(CPArray) |
anArray |
|
|
implementation |
Creates and returns a set containing a uniqued collection of those objects contained in a given array.
- Parameters
-
anArray | array containing the objects to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. |
Definition at line 60 of file CPSet.j.
+ (id) setWithObject: |
|
(id) |
anObject |
|
|
implementation |
Creates and returns a set that contains a single given object.
- Parameters
-
anObject | The object to add to the new set. |
Definition at line 69 of file CPSet.j.
+ (id) setWithObjects: |
|
(id) |
anObject |
, |
|
|
... |
|
|
| |
|
implementation |
Creates and returns a set containing the objects in a given argument list.
- Parameters
-
anObject | The first object to add to the new set. |
... | A comma-separated list of objects, ending with nil, to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. |
Definition at line 89 of file CPSet.j.
Creates and returns a set containing a specified number of objects from a given array of objects.
- Parameters
-
objects | A array of objects to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. |
count | The number of objects from objects to add to the new set. |
Definition at line 79 of file CPSet.j.
+ (id) setWithSet: |
|
(CPSet) |
set |
|
|
implementation |
Creates and returns a set containing the objects from another set.
- Parameters
-
aSet | A set containing the objects to add to the new set. |
Definition at line 103 of file CPSet.j.
- (CPArray) sortedArrayUsingDescriptors: |
|
(CPArray) |
someSortDescriptors |
|
|
implementation |
Returns an array of the set's content sorted as specified by a given array of sort descriptors.
- Parameters
-
Definition at line 384 of file CPSet.j.
- (id) valueForKeyPath: |
|
(CPString) |
aKeyPath |
|
|
implementation |
The documentation for this class was generated from the following files: