Initializer

init(indexesIn:)

Initializes an allocated NSIndexSet object with an index range. アロケートされたNSIndexSetオブジェクトをあるインデックス範囲で初期化します。

Declaration 宣言

init(indexesIn range: NSRange)

Parameters パラメータ

indexRange

An index range. インデックス範囲。 Must be in the range 0 .. NSNotFound - 1..

Return Value 戻り値

Initialized NSIndexSet object with indexRange. indexRangeで初期化されたNSIndexSetオブジェクト。

Discussion 議論

This method raises an rangeException when indexRange would add an index that exceeds the maximum allowed value for unsigned integers. このメソッドがrangeExceptionを引き起こすのは、indexRangeが符号なし整数に最大限許された値を超えるインデックスを加える時です。

The resulting index set has a firstIndex equal to the location of indexRange, and a count equal to the length of indexRange. Specifying a zero-length range results in an empty index set. 結果のインデックス集合は、indexRangelocationと等しいfirstIndex、そしてindexRangelengthと等しいcountを持ちます。ゼロ長範囲を指定することは、空のインデックス集合という結果になります。

This method is a designated initializer for NSIndexSet. このメソッドは、NSIndexSetに対する指定イニシャライザです。

See Also 参照

Creating Index Sets インデックス集合を作成する

Related Documentation 関連文書