Up

NSCountedSet class reference

Authors

Andrew Kachites McCallum (mccallum@gnu.ai.mit.edu)

Version: 1.48

Date: 2004/01/28 07:33:20

Copyright: (C) 1995, 1996, 1998 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSCountedSet class
  2. Software documentation for the NSMutableSet class
  3. Software documentation for the NSSet class
  4. Software documentation for the NSCountedSet(GNU_Uniquing) category

Software documentation for the NSCountedSet class

NSCountedSet : NSMutableSet

Declared in:
Foundation/NSSet.h
Standards:

The NSCountedSet class is used to maintain a set of objects where the number of times each object has been added (wiithout a corresponding removal) is kept track of.

In GNUstep, extra methods are provided to make use of a counted set for uniquing objects easier.

Method summary

countForObject: 

- (unsigned int) countForObject: (id)anObject;

Returns the number of times that an object that is equal to the specified object (as determined byt the [-isEqual:] method) has been added to the set and not removed from it.


Software documentation for the NSMutableSet class

NSMutableSet : NSSet

Declared in:
Foundation/NSSet.h
Standards:

Description forthcoming.

Method summary

setWithCapacity: 

+ (id) setWithCapacity: (unsigned)numItems;

Description forthcoming.


addObject: 

- (void) addObject: (id)anObject;

Adds anObject to the set.
The object is retained by the set.


addObjectsFromArray: 

- (void) addObjectsFromArray: (NSArray*)array;

Adds all the objects in the array to the receiver.


initWithCapacity: 

- (id) initWithCapacity: (unsigned)numItems;
This is a designated initialiser for the class.

Initialises a newly allocated set to contain no objects but to have space available to hold the specified number of items.
Additions of items to a set initialised with an appropriate capacity will be more efficient than addition of items otherwise.


intersectSet: 

- (void) intersectSet: (NSSet*)other;

Removes from the receiver all the objects it contains which are not also in other.


minusSet: 

- (void) minusSet: (NSSet*)other;

Removes from the receiver all the objects that are in other.


removeAllObjects 

- (void) removeAllObjects;

Removes all objects from the receiver.


removeObject: 

- (void) removeObject: (id)anObject;

Removes the anObject from the receiver.


setSet: 

- (void) setSet: (NSSet*)other;

Removes all objects from the receiver then adds the objects from other. If the receiver is other, the method has no effect.


unionSet: 

- (void) unionSet: (NSSet*)other;

Adds all the objects from other to the receiver.


Software documentation for the NSSet class

NSSet : NSObject

Declared in:
Foundation/NSSet.h
Conforms to:
NSCoding
NSCopying
NSMutableCopying
Standards:

Description forthcoming.

Method summary

set 

+ (id) set;

Description forthcoming.


setWithArray: 

+ (id) setWithArray: (NSArray*)objects;

Description forthcoming.


setWithObject: 

+ (id) setWithObject: (id)anObject;

Description forthcoming.


setWithObjects: ,...

+ (id) setWithObjects: (id)firstObject,...;

Description forthcoming.


setWithObjects: count: 

+ (id) setWithObjects: (id*)objects count: (unsigned)count;

Description forthcoming.


setWithSet: 

+ (id) setWithSet: (NSSet*)aSet;

Description forthcoming.


allObjects 

- (NSArray*) allObjects;

Description forthcoming.


anyObject 

- (id) anyObject;

Description forthcoming.


containsObject: 

- (BOOL) containsObject: (id)anObject;

Description forthcoming.


count 

- (unsigned) count;

Returns the number of objects stored in the set.


description 

- (NSString*) description;

Description forthcoming.


descriptionWithLocale: 

- (NSString*) descriptionWithLocale: (NSDictionary*)locale;

Description forthcoming.


initWithArray: 

- (id) initWithArray: (NSArray*)other;

Initialises a newly allocated set by adding all the objects in the supplied array to the set.


initWithObjects: ,...

- (id) initWithObjects: (id)firstObject,...;

Description forthcoming.


initWithObjects: count: 

- (id) initWithObjects: (id*)objects count: (unsigned)count;

Description forthcoming.


initWithSet: 

- (id) initWithSet: (NSSet*)other;

Description forthcoming.


initWithSet: copyItems: 

- (id) initWithSet: (NSSet*)other copyItems: (BOOL)flag;

Initialises a newly allocated set by adding all the objects in the supplied set.


intersectsSet: 

- (BOOL) intersectsSet: (NSSet*)otherSet;

Description forthcoming.


isEqualToSet: 

- (BOOL) isEqualToSet: (NSSet*)other;

Description forthcoming.


isSubsetOfSet: 

- (BOOL) isSubsetOfSet: (NSSet*)otherSet;

Description forthcoming.


makeObjectsPerform: 

- (void) makeObjectsPerform: (SEL)aSelector;

Description forthcoming.


makeObjectsPerform: withObject: 

- (void) makeObjectsPerform: (SEL)aSelector withObject: (id)argument;

Description forthcoming.


makeObjectsPerformSelector: 

- (void) makeObjectsPerformSelector: (SEL)aSelector;

Description forthcoming.


makeObjectsPerformSelector: withObject: 

- (void) makeObjectsPerformSelector: (SEL)aSelector withObject: (id)argument;

Description forthcoming.


member: 

- (id) member: (id)anObject;

Description forthcoming.


objectEnumerator 

- (NSEnumerator*) objectEnumerator;

Description forthcoming.


Software documentation for the NSCountedSet(GNU_Uniquing) category

NSCountedSet(GNU_Uniquing)

Declared in:
Foundation/NSSet.h
Standards:

Description forthcoming.

Method summary

purge: 

- (void) purge: (int)level;

Description forthcoming.


unique: 

- (id) unique: (id)anObject;

Description forthcoming.



Up