CPIndexSet Class Reference
[Foundation]

List of all members.

Public Member Functions

(id) - init [implementation]
(id) - initWithIndex: [implementation]
(id) - initWithIndexesInRange: [implementation]
(id) - initWithIndexSet: [implementation]
(BOOL) - isEqualToIndexSet: [implementation]
(BOOL) - containsIndex: [implementation]
(BOOL) - containsIndexesInRange: [implementation]
(BOOL) - containsIndexes: [implementation]
(BOOL) - intersectsIndexesInRange: [implementation]
(int) - count [implementation]
(int) - firstIndex [implementation]
(int) - lastIndex [implementation]
(unsigned) - indexGreaterThanIndex: [implementation]
(unsigned) - indexLessThanIndex: [implementation]
(unsigned int) - indexGreaterThanOrEqualToIndex: [implementation]
(unsigned int) - indexLessThanOrEqualToIndex: [implementation]
(unsigned) - getIndexes:maxCount:inIndexRange: [implementation]
(CPString- description [implementation]
(id) - initWithCoder: [implementation]
(void) - encodeWithCoder: [implementation]
(id) - copy [implementation]
(id) - mutableCopy [implementation]

Static Public Member Functions

(id) + indexSet [implementation]
(id) + indexSetWithIndex: [implementation]
(id) + indexSetWithIndexesInRange: [implementation]


Detailed Description

Instances of this class are collections of numbers. Each integer can appear in a collection only once.

Definition at line 32 of file CPIndexSet.j.


Member Function Documentation

- (BOOL) containsIndex: (unsigned)  anIndex   [implementation]

Returns YES if the index set contains the specified index.

Parameters:
anIndex the index to check for in the set
Returns:
YES if anIndex is in the receiver index set

Definition at line 176 of file CPIndexSet.j.

- (BOOL) containsIndexes: (CPIndexSet anIndexSet   [implementation]

Returns YES if the receving index set contains all the indices in the argument.

Parameters:
anIndexSet the set of indices to check for in the receiving index set

Definition at line 216 of file CPIndexSet.j.

- (BOOL) containsIndexesInRange: (CPRange)  aRange   [implementation]

Returns YES if the index set contains all the numbers in the specified range.

Parameters:
aRange the range of numbers to check for in the index set

Definition at line 185 of file CPIndexSet.j.

- (id) copy   [implementation]

Creates a deep copy of the index set. The returned copy is mutable. The reason for the two copy methods is for source compatability with GNUStep code.

Returns:
the index set copy

Definition at line 800 of file CPIndexSet.j.

- (int) count   [implementation]

The number of indices in the set

Definition at line 264 of file CPIndexSet.j.

- (CPString) description   [implementation]

Definition at line 412 of file CPIndexSet.j.

- (void) encodeWithCoder: (CPCoder aCoder   [implementation]

Writes out the index set to the specified coder.

Parameters:
aCoder the coder to which the index set will be written

Definition at line 775 of file CPIndexSet.j.

- (int) firstIndex   [implementation]

Return the first index in the set

Definition at line 273 of file CPIndexSet.j.

- (unsigned) getIndexes: (CPArray anArray
maxCount: (unsigned)  aMaxCount
inIndexRange: (CPRange)  aRangePointer 
[implementation]

Fills up the specified array with numbers from the index set within the specified range. The method stops filling up the array until the aMaxCount number have been added or the range maximum is reached.

Parameters:
anArray the array to fill up
aMaxCount the maximum number of numbers to adds
aRangePointer the range of indices to add
Returns:
the number of elements added to the array

Definition at line 365 of file CPIndexSet.j.

- (unsigned) indexGreaterThanIndex: (unsigned)  anIndex   [implementation]

Returns the first index value in the receiver which is greater than anIndex.

Returns:
the closest index or CPNotFound if no match was found

Definition at line 290 of file CPIndexSet.j.

- (unsigned int) indexGreaterThanOrEqualToIndex: (unsigned)  anIndex   [implementation]

Returns the first index value in the receiver which is greater than or equal to anIndex.

Returns:
the matching index or CPNotFound if no match was found

Definition at line 342 of file CPIndexSet.j.

- (unsigned) indexLessThanIndex: (unsigned)  anIndex   [implementation]

Returns the first index value in the receiver which is less than anIndex.

Returns:
the closest index or CPNotFound if no match was found

Definition at line 315 of file CPIndexSet.j.

- (unsigned int) indexLessThanOrEqualToIndex: (unsigned)  anIndex   [implementation]

Returns the first index value in the receiver which is less than or equal to anIndex.

Returns:
the matching index or CPNotFound if no match was found

Definition at line 351 of file CPIndexSet.j.

+ (id) indexSet   [implementation]

Returns a new empty index set.

Definition at line 43 of file CPIndexSet.j.

+ (id) indexSetWithIndex: (int)  anIndex   [implementation]

Returns a new index set with just one index.

Definition at line 51 of file CPIndexSet.j.

+ (id) indexSetWithIndexesInRange: (CPRange)  aRange   [implementation]

Returns a new index set with all the numbers in the specified range.

Parameters:
aRange the range of numbers to add to the index set.

Definition at line 60 of file CPIndexSet.j.

- (id) init   [implementation]

Definition at line 67 of file CPIndexSet.j.

- (id) initWithCoder: (CPCoder aCoder   [implementation]

Initializes the index set from a coder.

Parameters:
aCoder the coder from which to read the index set data
Returns:
the initialized index set

Definition at line 749 of file CPIndexSet.j.

- (id) initWithIndex: (int)  anIndex   [implementation]

Initializes the index set with a single index.

Returns:
the initialized index set

Definition at line 85 of file CPIndexSet.j.

- (id) initWithIndexesInRange: (CPRange)  aRange   [implementation]

Initializes the index set with numbers from the specified range.

Parameters:
aRange the range of numbers to add to the index set
Returns:
the initialized index set

Definition at line 104 of file CPIndexSet.j.

- (id) initWithIndexSet: (CPIndexSet anIndexSet   [implementation]

Initializes the index set with another index set.

Parameters:
anIndexSet the index set from which to read the initial index set
Returns:
the initialized index set

Definition at line 123 of file CPIndexSet.j.

- (BOOL) intersectsIndexesInRange: (CPRange)  aRange   [implementation]

Checks if the receiver contains at least one number in aRange.

Parameters:
aRange the range of numbers to check.
Returns:
YES if the receiving index set contains at least one number in the provided range

Definition at line 242 of file CPIndexSet.j.

- (BOOL) isEqualToIndexSet: (CPIndexSet anIndexSet   [implementation]

Compares the receiver with the provided index set.

Parameters:
anIndexSet the index set to compare to
Returns:
YES if the receiver and the index set are functionally equivalent

Definition at line 149 of file CPIndexSet.j.

- (int) lastIndex   [implementation]

Returns the last index in the set

Definition at line 281 of file CPIndexSet.j.

- (id) mutableCopy   [implementation]

Creates a deep copy of the index set. The returned copy is mutable. The reason for the two copy methods is for source compatability with GNUStep code.

Returns:
the index set copy

Definition at line 811 of file CPIndexSet.j.


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

Generated on Wed May 20 12:44:00 2009 for Cappuccino by  doxygen 1.5.8