Important: The information in this document is obsolete and should not be used for new development.
Inherits from | |
Implements | |
Package | com.apple.cocoa.foundation |
Availability | Available in Mac OS X v10.3 and later. |
Companion guide |
NSMutableIndexSet manages a mutable collection of unsigned integers. This collection is referred to as an index set and is composed of a series of indexes. A given index can appear only once in an index set. The values in an index set are always sorted, so the order in which values are added is irrelevant.
Internally, indexes are represented in ranges. Thus, an index set includes the integer members of a range or of many ranges. For maximum performance and efficiency, overlapping ranges in an index set are automatically coalesced (ranges merge rather than overlap).
NSMutableIndexSet is not intended to be subclassed.
Creates and returns an NSMutableIndexSet containing the indexes specified by NSRange.ZeroRange
.
public NSMutableIndexSet
()
Creates and returns an NSMutableIndexSet containing a single index, value.
public NSMutableIndexSet
(int value)
Creates and returns an NSMutableIndexSet containing the indexes specified by range.
public NSMutableIndexSet
(NSRange range)
Creates and returns an NSMutableIndexSet containing the indexes in indexSet.
public NSMutableIndexSet
(NSIndexSet indexSet)
Adds the index specified by value to the receiver.
public void addIndex
(int value)
This method throws a RangeException
if the addition of value to the index set would exceed the maximum range allowed by NSIndexSet.
public void addIndexes
(NSIndexSet indexSet)
Adds the indexes specified by indexSet to the receiver.
Adds the indexes specified by range to the receiver.
public void addIndexesInRange
(NSRange range)
This method throws a RangeException
if the addition of the indexes specified by range would exceed the maximum range allowed by NSIndexSet.
Removes all the indexes from the receiver.
public void removeAllIndexes
()
Removes the index specified by value from the receiver.
public void removeIndex
(int value)
Removes the indexes contained in indexSet from the receiver.
public void removeIndexes
(NSIndexSet indexSet)
Removes the indexes specified by range from the receiver.
public void removeIndexesInRange
(NSRange range)
public void shiftIndexes
(int index, int delta)
For a positive delta, shifts the indexes in [index, INT_MAX
] to the right, thereby inserting an "empty space" in the range [index, delta]. For a negative delta, shifts the indexes in [index, INT_MAX
] to the left, thereby deleting the indexes in the range [index - delta, delta].
© 1997, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-07-24)