A collection of unique integers. More...
Public Member Functions | |
(void) | - addIndex: [implementation] |
(void) | - addIndexes: [implementation] |
(void) | - addIndexesInRange: [implementation] |
(BOOL) | - containsIndex: [implementation] |
(BOOL) | - containsIndexes: [implementation] |
(BOOL) | - containsIndexesInRange: [implementation] |
(id) | - copy [implementation] |
(int) | - count [implementation] |
(CPString) | - description [implementation] |
(void) | - encodeWithCoder: [implementation] |
(CPInteger) | - firstIndex [implementation] |
(CPInteger) | - getIndexes:maxCount:inIndexRange: [implementation] |
(CPInteger) | - indexGreaterThanIndex: [implementation] |
(CPInteger) | - indexGreaterThanOrEqualToIndex: [implementation] |
(CPInteger) | - indexLessThanIndex: [implementation] |
(CPInteger) | - indexLessThanOrEqualToIndex: [implementation] |
(id) | - init [implementation] |
(id) | - initWithCoder: [implementation] |
(id) | - initWithIndex: [implementation] |
(id) | - initWithIndexesInRange: [implementation] |
(id) | - initWithIndexSet: [implementation] |
(BOOL) | - intersectsIndexesInRange: [implementation] |
(BOOL) | - isEqualToIndexSet: [implementation] |
(CPInteger) | - lastIndex [implementation] |
(id) | - mutableCopy [implementation] |
(void) | - removeAllIndexes [implementation] |
(void) | - removeIndex: [implementation] |
(void) | - removeIndexes: [implementation] |
(void) | - removeIndexesInRange: [implementation] |
(void) | - removeMatches: [implementation] |
(void) | - shiftIndexesStartingAtIndex:by: [implementation] |
Static Public Member Functions | |
(id) | + indexSet [implementation] |
(id) | + indexSetWithIndex: [implementation] |
(id) | + indexSetWithIndexesInRange: [implementation] |
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 3302 of file CPTableView.j.
- (void) addIndex: | (CPInteger) | anIndex | [implementation] |
Adds an index to the set.
anIndex | the index to add |
Definition at line 476 of file CPIndexSet.j.
- (void) addIndexes: | (CPIndexSet) | anIndexSet | [implementation] |
Adds indices to the set
anIndexSet | a set of indices to add to the receiver |
Definition at line 485 of file CPIndexSet.j.
- (void) addIndexesInRange: | (CPRange) | aRange | [implementation] |
Adds the range of indices to the set
aRange | the range of numbers to add as indices to the set |
Definition at line 499 of file CPIndexSet.j.
- (BOOL) containsIndex: | (CPInteger) | anIndex | [implementation] |
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 167 of file CPIndexSet.j.
- (BOOL) containsIndexes: | (CPIndexSet) | anIndexSet | [implementation] |
Returns YES
if the receving 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 202 of file CPIndexSet.j.
- (BOOL) containsIndexesInRange: | (CPRange) | aRange | [implementation] |
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 176 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.
Definition at line 822 of file CPIndexSet.j.
- (int) count | [implementation] |
The number of indices in the set
Definition at line 249 of file CPIndexSet.j.
- (CPString) description | [implementation] |
Definition at line 429 of file CPIndexSet.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
Writes out the index set to the specified coder.
aCoder | the coder to which the index set will be written |
Definition at line 798 of file CPIndexSet.j.
- (CPInteger) firstIndex | [implementation] |
Return the first index in the set
Definition at line 258 of file CPIndexSet.j.
- (CPInteger) getIndexes: | (CPArray) | anArray | ||
maxCount: | (CPInteger) | aMaxCount | ||
inIndexRange: | (CPRange) | aRange | ||
[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.
anArray | the array to fill up | |
aMaxCount | the maximum number of numbers to adds | |
aRangePointer | the range of indices to add |
Definition at line 366 of file CPIndexSet.j.
- (CPInteger) indexGreaterThanIndex: | (CPInteger) | anIndex | [implementation] |
Returns the first index value in the receiver which is greater than anIndex
.
Definition at line 281 of file CPIndexSet.j.
- (CPInteger) indexGreaterThanOrEqualToIndex: | (CPInteger) | anIndex | [implementation] |
Returns the first index value in the receiver which is greater than or equal to anIndex
.
Definition at line 343 of file CPIndexSet.j.
- (CPInteger) indexLessThanIndex: | (CPInteger) | anIndex | [implementation] |
Returns the first index value in the receiver which is less than anIndex
.
Definition at line 312 of file CPIndexSet.j.
- (CPInteger) indexLessThanOrEqualToIndex: | (CPInteger) | anIndex | [implementation] |
Returns the first index value in the receiver which is less than or equal to anIndex
.
Definition at line 352 of file CPIndexSet.j.
+ (id) indexSet | [implementation] |
Returns a new empty index set.
Definition at line 48 of file CPIndexSet.j.
+ (id) indexSetWithIndex: | (int) | anIndex | [implementation] |
Returns a new index set with just one index.
Definition at line 56 of file CPIndexSet.j.
+ (id) indexSetWithIndexesInRange: | (CPRange) | aRange | [implementation] |
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 65 of file CPIndexSet.j.
- (id) init | [implementation] |
Definition at line 72 of file CPIndexSet.j.
- (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
Initializes the index set from a coder.
aCoder | the coder from which to read the index set data |
Definition at line 773 of file CPIndexSet.j.
- (id) initWithIndex: | (CPInteger) | anIndex | [implementation] |
Initializes the index set with a single index.
Definition at line 81 of file CPIndexSet.j.
- (id) initWithIndexesInRange: | (CPRange) | aRange | [implementation] |
Initializes the index set with numbers from the specified range.
aRange | the range of numbers to add to the index set |
Definition at line 91 of file CPIndexSet.j.
- (id) initWithIndexSet: | (CPIndexSet) | anIndexSet | [implementation] |
Initializes the index set with another index set.
anIndexSet | the index set from which to read the initial index set |
Definition at line 113 of file CPIndexSet.j.
- (BOOL) intersectsIndexesInRange: | (CPRange) | aRange | [implementation] |
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 228 of file CPIndexSet.j.
- (BOOL) isEqualToIndexSet: | (CPIndexSet) | anIndexSet | [implementation] |
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 138 of file CPIndexSet.j.
- (CPInteger) lastIndex | [implementation] |
Returns the last index in the set
Definition at line 269 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.
Definition at line 833 of file CPIndexSet.j.
- (void) removeAllIndexes | [implementation] |
Removes all indices from the set
Definition at line 591 of file CPIndexSet.j.
- (void) removeIndex: | (CPInteger) | anIndex | [implementation] |
Removes an index from the set
anIndex | the index to remove |
Definition at line 568 of file CPIndexSet.j.
- (void) removeIndexes: | (CPIndexSet) | anIndexSet | [implementation] |
Removes the indices from the receiving set.
anIndexSet | the set of indices to remove from the receiver |
Definition at line 578 of file CPIndexSet.j.
- (void) removeIndexesInRange: | (CPRange) | aRange | [implementation] |
Removes the indices in the range from the set.
aRange | the range of indices to remove |
Definition at line 602 of file CPIndexSet.j.
- (void) removeMatches: | (id) | otherSet | [implementation] |
Definition at line 3304 of file CPTableView.j.
- (void) shiftIndexesStartingAtIndex: | (CPInteger) | anIndex | ||
by: | (int) | aDelta | ||
[implementation] |
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 685 of file CPIndexSet.j.