AnyRandomAccessIndex

A wrapper over an underlying RandomAccessIndexType that hides the specific underlying type.

See Also: AnyRandomAccessCollection

Inheritance BidirectionalIndexType, Comparable, Equatable, ForwardIndexType, RandomAccessIndexType, Strideable, _Incrementable, _RandomAccessAmbiguity, _Strideable View Protocol Hierarchy →
Associated Types
Import
  • import Swift

Initializers

init(_:)

Wrap and forward operations to base.

Declaration

Instance Methods

func distanceTo(_:)

Declaration

Declared In

AnyRandomAccessIndex, ForwardIndexType
func predecessor()

Return the previous consecutive value in a discrete sequence of AnyRandomAccessIndex values.

Requires: self has a well-defined predecessor.

Declaration

func stride(through:by:)

Return the sequence of values (start, start + stride, start + stride + stride, ... last) where last is the last value in the progression less than or equal to end.

Note: There is no guarantee that end is an element of the sequence.

Declaration

Declared In

Strideable
func stride(to:by:)

Return the sequence of values (self, self + stride, self + stride + stride, ... last) where last is the last value in the progression that is less than end.

Declaration

Declared In

Strideable
func successor()

Return the next consecutive value in a discrete sequence of AnyRandomAccessIndex values.

Requires: self has a well-defined successor.

Declaration

2 inherited items hidden. (Show all)