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

#import <CPSet.h>

+ Inheritance diagram for CPSet:

Instance Methods

(CPArray- allObjects
 
(id) - anyObject
 
(BOOL) - containsObject:
 
(id) - copy
 
(CPUInteger) - count
 
(CPString- description
 
(void) - encodeWithCoder:
 
(void) - enumerateObjectsUsingBlock:
 
(CPSet- filteredSetUsingPredicate:
 
(void) - filterUsingPredicate:
 
(id) - init
 
(id) - initWithArray:
 
(id) - initWithCoder:
 
(id) - initWithObjects:
 
(id) - initWithObjects:count:
 
(id) - initWithSet:
 
(id) - initWithSet:copyItems:
 
(BOOL) - intersectsSet:
 
(BOOL) - isEqual:
 
(BOOL) - isEqualToSet:
 
(BOOL) - isSubsetOfSet:
 
(void) - makeObjectsPerformSelector:
 
(void) - makeObjectsPerformSelector:withObject:
 
(void) - makeObjectsPerformSelector:withObjects:
 
(id) - member:
 
(id) - mutableCopy
 
(CPEnumerator- objectEnumerator
 
(CPSet- objectsPassingTest:
 
(id) - setByAddingObject:
 
(id) - setByAddingObjectsFromArray:
 
(id) - setByAddingObjectsFromSet:
 
(void) - setValue:forKey:
 
(CPArray- sortedArrayUsingDescriptors:
 
(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) - isEqual:
 
(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
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKeyPath:
 
(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) + set
 
(id) + setWithArray:
 
(id) + setWithObject:
 
(id) + setWithObjects:
 
(id) + setWithObjects:count:
 
(id) + setWithSet:
 
- 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

Definition at line 2 of file CPSet.h.

Method Documentation

- (CPArray) allObjects
implementation

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.

+ (id) alloc
implementation

Allocates a new instance of the receiving class

Reimplemented from CPObject.

Definition at line 40 of file CPSet.j.

- (id) anyObject
implementation

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
anObjectThe object for which to test membership of the receiver.

Definition at line 239 of file CPSet.j.

- (id) copy
implementation

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.

- (CPUInteger) count
implementation

Returns the number of members in the receiver.

Definition at line 207 of file CPSet.j.

- (CPString) description
implementation

Returns a human readable string describing the receiver

Reimplemented from CPObject.

Definition at line 411 of file CPSet.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Provided by category CPSet(CPCoding).

Definition at line 453 of file CPSet.j.

- (void) enumerateObjectsUsingBlock: (Function)  aFunction
implementation

Enumberates over the objects in a set using a given function.

Parameters
aFunctiona callback for each itteration, should be of the format: function(anObject).

Definition at line 319 of file CPSet.j.

- (CPSet) filteredSetUsingPredicate: (CPPredicate aPredicate
implementation

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.

- (void) filterUsingPredicate: (CPPredicate predicate
implementation

Reimplemented in CPMutableSet.

Provided by category CPSet(CPPredicate).

Definition at line 245 of file CPPredicate.j.

- (id) init
implementation

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
arrayAn 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

Provided by category CPSet(CPCoding).

Definition at line 448 of file CPSet.j.

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

Initializes a newly allocated set with members taken from the specified list of objects.

Parameters
anObjectThe 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.

- (id) initWithObjects: (CPArray objects
count: (CPUInteger)  aCount 
implementation

Creates and returns a set containing the objects from an array.

Parameters
anArrayAn array containing the objects to add to the new set.
aCountthe 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
aSeta set containing objects to add to the new set.

Definition at line 186 of file CPSet.j.

- (id) initWithSet: (CPSet aSet
copyItems: (BOOL)  shouldCopyItems 
implementation

Initializes a newly allocated set and adds to it members of another given set. Only included for compatability.

Parameters
aSeta set of objects to add to the new set.
shouldCopyItemsa 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
setThe 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
aSeta set of objects

Definition at line 402 of file CPSet.j.

- (BOOL) isEqualToSet: (CPSet aSet
implementation

Compares the receiver to another set.

Parameters
setThe 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
setThe 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
aSelectorA 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.

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

Sends to each object in the receiver a message specified by a given selector.

Parameters
aSelectorA 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.
anObjectThe object to pass as an argument to the method specified by aSelector.

Definition at line 275 of file CPSet.j.

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

Sends to each object in the receiver a message specified by a given selector.

Parameters
aSelectorA 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.
objectsThe 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
anObjectThe object for which to test for membership of the receiver.

Definition at line 302 of file CPSet.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 CPSet(CPCopying).

Definition at line 437 of file CPSet.j.

- (CPEnumerator) objectEnumerator
implementation

Returns an object enumerator (CPEnumerator) for the receiver.

Definition at line 310 of file CPSet.j.

- (CPSet) objectsPassingTest: (Function)  aFunction
implementation

Definition at line 330 of file CPSet.j.

+ (id) set
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
anObjectto 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
anArraywith 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
aSetto add objects to add to the new set.

Definition at line 121 of file CPSet.j.

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

Reimplemented from CPObject.

Provided by category CPSet(CPKeyValueCoding).

Definition at line 481 of file CPSet.j.

+ (id) setWithArray: (CPArray anArray
implementation

Creates and returns a set containing a uniqued collection of those objects contained in a given array.

Parameters
anArrayarray 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
anObjectThe 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
anObjectThe 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.

+ (id) setWithObjects: (id)  objects
count: (CPUInteger)  count 
implementation

Creates and returns a set containing a specified number of objects from a given array of objects.

Parameters
objectsA 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.
countThe 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
aSetA 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
sortDescriptorsan array of CPSortDescriptor objects.

Definition at line 384 of file CPSet.j.

- (id) valueForKey: (CPString aKey
implementation

Reimplemented from CPObject.

Provided by category CPSet(CPKeyValueCoding).

Definition at line 462 of file CPSet.j.

- (id) valueForKeyPath: (CPString aKeyPath
implementation

Reimplemented from CPObject.

Provided by category CPSet(CPKeyValueCoding).

Definition at line 384 of file CPSet+KVO.j.


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