subscript(_:)
Returns the object at the specified index of the set.
Declaration
subscript(idx: Int) -> Any { get }subscript(idx: Int) -> Any { get set }Parameters
- idx:
The object located at index.
Return Value
If idx is beyond the end of the ordered set (that is, if index is greater than or equal to the value returned by count), an rangeException is raised.
Discussion
This method is the same as object(at:).
See Also
Accessing Set Members
contains(_:)enumerateObjects(at:options:using:)enumerateObjects(_:)enumerateObjects(options:using:)firstObjectlastObjectobject(at:)objects(at:)index(of:)index(of:inSortedRange:options:usingComparator:)index(ofObjectAt:options:passingTest:)index(ofObjectPassingTest:)index(_:ofObjectPassingTest:)indexes(ofObjectsAt:options:passingTest:)indexes(ofObjectsPassingTest:)