![]() |
API 0.9.5
|
A collection of unique integers. More...
#import <CPIndexSet.h>
Instance Methods | |
(void) | - addIndex: |
(void) | - addIndexes: |
(void) | - addIndexesInRange: |
(BOOL) | - containsIndex: |
(BOOL) | - containsIndexes: |
(BOOL) | - containsIndexesInRange: |
(id) | - copy |
(int) | - count |
(CPString) | - description |
(void) | - encodeWithCoder: |
(CPInteger) | - firstIndex |
(CPInteger) | - getIndexes:maxCount:inIndexRange: |
(CPInteger) | - indexGreaterThanIndex: |
(CPInteger) | - indexGreaterThanOrEqualToIndex: |
(CPInteger) | - indexLessThanIndex: |
(CPInteger) | - indexLessThanOrEqualToIndex: |
(id) | - init |
(id) | - initWithCoder: |
(id) | - initWithIndex: |
(id) | - initWithIndexesInRange: |
(id) | - initWithIndexSet: |
(BOOL) | - intersectsIndexesInRange: |
(BOOL) | - isEqual: |
(BOOL) | - isEqualToIndexSet: |
(CPInteger) | - lastIndex |
(id) | - mutableCopy |
(void) | - removeAllIndexes |
(void) | - removeIndex: |
(void) | - removeIndexes: |
(void) | - removeIndexesInRange: |
(void) | - removeMatches: |
(void) | - shiftIndexesStartingAtIndex:by: |
Class Methods | |
(id) | + indexSet |
(id) | + indexSetWithIndex: |
(id) | + indexSetWithIndexesInRange: |
A collection of unique integers.
Instances of this class are collections of numbers. Each integer can appear in a collection only once.
Definition at line 4827 of file CPTableView.j.
- (void) addIndex: | (CPInteger) | anIndex |
Adds an index to the set.
anIndex | the index to add |
Definition at line 492 of file CPIndexSet.j.
- (void) addIndexes: | (CPIndexSet) | anIndexSet |
Adds indices to the set
anIndexSet | a set of indices to add to the receiver |
Definition at line 501 of file CPIndexSet.j.
- (void) addIndexesInRange: | (CPRange) | aRange |
Adds the range of indices to the set
aRange | the range of numbers to add as indices to the set |
Definition at line 515 of file CPIndexSet.j.
- (BOOL) containsIndex: | (CPInteger) | anIndex |
Returns YES
if the index set contains the specified index.
anIndex | the index to check for in the set |
YES
if anIndex
is in the receiver index set Definition at line 183 of file CPIndexSet.j.
- (BOOL) containsIndexes: | (CPIndexSet) | anIndexSet |
Returns YES
if the receiving index set contains all the indices in the argument.
anIndexSet | the set of indices to check for in the receiving index set |
Definition at line 218 of file CPIndexSet.j.
- (BOOL) containsIndexesInRange: | (CPRange) | aRange |
Returns YES
if the index set contains all the numbers in the specified range.
aRange | the range of numbers to check for in the index set |
Definition at line 192 of file CPIndexSet.j.
- (id) copy |
Creates a deep copy of the index set. The returned copy is mutable. The reason for the two copy methods is for source compatibility with GNUStep code.
Definition at line 839 of file CPIndexSet.j.
- (int) count |
The number of indices in the set
Definition at line 265 of file CPIndexSet.j.
- (CPString) description |
Definition at line 445 of file CPIndexSet.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder |
Writes out the index set to the specified coder.
aCoder | the coder to which the index set will be written |
Definition at line 815 of file CPIndexSet.j.
- (CPInteger) firstIndex |
Return the first index in the set
Definition at line 274 of file CPIndexSet.j.
- (CPInteger) getIndexes: | (CPArray) | anArray | |
maxCount: | (CPInteger) | aMaxCount | |
inIndexRange: | (CPRange) | aRange | |
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.
anArray | the array to fill up |
aMaxCount | the maximum number of numbers to adds |
aRangePointer | the range of indices to add |
Definition at line 382 of file CPIndexSet.j.
- (CPInteger) indexGreaterThanIndex: | (CPInteger) | anIndex |
Returns the first index value in the receiver which is greater than anIndex
.
Definition at line 297 of file CPIndexSet.j.
- (CPInteger) indexGreaterThanOrEqualToIndex: | (CPInteger) | anIndex |
Returns the first index value in the receiver which is greater than or equal to anIndex
.
Definition at line 359 of file CPIndexSet.j.
- (CPInteger) indexLessThanIndex: | (CPInteger) | anIndex |
Returns the first index value in the receiver which is less than anIndex
.
Definition at line 328 of file CPIndexSet.j.
- (CPInteger) indexLessThanOrEqualToIndex: | (CPInteger) | anIndex |
Returns the first index value in the receiver which is less than or equal to anIndex
.
Definition at line 368 of file CPIndexSet.j.
+ (id) indexSet |
Returns a new empty index set.
Definition at line 46 of file CPIndexSet.j.
+ (id) indexSetWithIndex: | (int) | anIndex |
Returns a new index set with just one index.
Definition at line 54 of file CPIndexSet.j.
+ (id) indexSetWithIndexesInRange: | (CPRange) | aRange |
Returns a new index set with all the numbers in the specified range.
aRange | the range of numbers to add to the index set. |
Definition at line 63 of file CPIndexSet.j.
- (id) init |
Definition at line 70 of file CPIndexSet.j.
- (id) initWithCoder: | (CPCoder) | aCoder |
Initializes the index set from a coder.
aCoder | the coder from which to read the index set data |
Definition at line 790 of file CPIndexSet.j.
- (id) initWithIndex: | (CPInteger) | anIndex |
Initializes the index set with a single index.
Definition at line 79 of file CPIndexSet.j.
- (id) initWithIndexesInRange: | (CPRange) | aRange |
Initializes the index set with numbers from the specified range.
aRange | the range of numbers to add to the index set |
Definition at line 89 of file CPIndexSet.j.
- (id) initWithIndexSet: | (CPIndexSet) | anIndexSet |
Initializes the index set with another index set.
anIndexSet | the index set from which to read the initial index set |
Definition at line 111 of file CPIndexSet.j.
- (BOOL) intersectsIndexesInRange: | (CPRange) | aRange |
Checks if the receiver contains at least one number in aRange
.
aRange | the range of numbers to check. |
YES
if the receiving index set contains at least one number in the provided range Definition at line 244 of file CPIndexSet.j.
- (BOOL) isEqual: | (id) | anObject |
Definition at line 130 of file CPIndexSet.j.
- (BOOL) isEqualToIndexSet: | (CPIndexSet) | anIndexSet |
Compares the receiver with the provided index set.
anIndexSet | the index set to compare to |
YES
if the receiver and the index set are functionally equivalent Definition at line 147 of file CPIndexSet.j.
- (CPInteger) lastIndex |
Returns the last index in the set
Definition at line 285 of file CPIndexSet.j.
- (id) mutableCopy |
Creates a deep copy of the index set. The returned copy is mutable. The reason for the two copy methods is for source compatibility with GNUStep code.
Definition at line 850 of file CPIndexSet.j.
- (void) removeAllIndexes |
Removes all indices from the set
Definition at line 607 of file CPIndexSet.j.
- (void) removeIndex: | (CPInteger) | anIndex |
Removes an index from the set
anIndex | the index to remove |
Definition at line 584 of file CPIndexSet.j.
- (void) removeIndexes: | (CPIndexSet) | anIndexSet |
Removes the indices from the receiving set.
anIndexSet | the set of indices to remove from the receiver |
Definition at line 594 of file CPIndexSet.j.
- (void) removeIndexesInRange: | (CPRange) | aRange |
Removes the indices in the range from the set.
aRange | the range of indices to remove |
Definition at line 618 of file CPIndexSet.j.
- (void) removeMatches: | (CPIndexSet) | otherSet |
Definition at line 4829 of file CPTableView.j.
- (void) shiftIndexesStartingAtIndex: | (CPInteger) | anIndex | |
by: | (int) | aDelta | |
Shifts the values of indices left or right by a specified amount.
anIndex | the index to start the shifting operation from (inclusive) |
aDelta | the amount and direction to shift. A positive value shifts to the right. A negative value shifts to the left. |
Definition at line 701 of file CPIndexSet.j.