MutableSliceable

A collection with mutable slices.

For example,

  • x[i..<j] = *someExpression*
  • x[i..<j].*mutatingMethod*()
Inheritance CollectionType, MutableCollectionType, SequenceType, Sliceable, _CollectionType, _SequenceType, _Sequence_Type, _Sliceable View Protocol Hierarchy →
Associated Types

A type that provides the sequence's iteration interface and encapsulates its iteration state.

The collection type that represents a sub-range of elements.

Though it can't currently be enforced by the type system, the SubSlice type in a concrete implementation of Sliceable should also be Sliceable.

A type that represents a valid position in the collection.

Valid indices consist of the position of every element and a "past the end" position that's not valid for use as a subscript.

  • _Element

A type that represents a valid position in the collection.

Valid indices consist of the position of every element and a "past the end" position that's not valid for use as a subscript.

4 inherited items hidden. (Show all)

Import
  • import Swift

Instance Variables

var endIndex: Index Required

The collection's "past the end" position.

endIndex is not a valid argument to subscript, and is always reachable from startIndex by zero or more applications of successor().

Declaration

  • var endIndex: Index { get }

Declared In

_CollectionType
var startIndex: Index Required

The position of the first element in a non-empty collection.

Identical to endIndex in an empty collection.

Declaration

  • var startIndex: Index { get }

Declared In

_CollectionType

2 inherited items hidden. (Show all)

Subscripts

subscript(_: Range<Self.Index>) Required

Declaration

  • subscript(_: Range<Self.Index>) -> Self.SubSlice { get set }

Declared In

MutableSliceable, Sliceable
subscript(_: Self.Index) Required

Declaration

  • subscript(position: Self.Index) -> Self.Generator.Element { get }

Declared In

CollectionType, MutableCollectionType
subscript(_: Index) Required

Declaration

  • subscript(_i: Index) -> _Element { get }

Declared In

_CollectionType

2 inherited items hidden. (Show all)

Instance Methods

func generate() Required

Return a generator over the elements of this sequence.

Complexity: O(1)

Declaration

  • func generate() -> Generator

Declared In

SequenceType, _Sequence_Type

1 inherited item hidden. (Show all)