struct
AnyRandomAccessIndex
Inheritance |
BidirectionalIndexType, Comparable, Equatable, ForwardIndexType, RandomAccessIndexType, Strideable, _Incrementable, _RandomAccessAmbiguity, _Strideable
View Protocol Hierarchy →
|
---|---|
Associated Types |
|
Import |
|
Initializers
Wrap and forward operations to base
.
Declaration
init
<
BaseIndex
:
RandomAccessIndexType
>
(
_
base
:
BaseIndex
)
Instance Methods
Declaration
func
advancedBy
(
amount
:
Distance
) -
>
AnyRandomAccessIndex
Declared In
AnyRandomAccessIndex
, BidirectionalIndexType
, _RandomAccessAmbiguity
, ForwardIndexType
Declaration
func
advancedBy
(
amount
:
Distance
,
limit
:
AnyRandomAccessIndex
) -
>
AnyRandomAccessIndex
Declared In
AnyRandomAccessIndex
, RandomAccessIndexType
, BidirectionalIndexType
, ForwardIndexType
Declaration
func
distanceTo
(
other
:
AnyRandomAccessIndex
) -
>
Distance
Declared In
AnyRandomAccessIndex
, ForwardIndexType
Return the previous consecutive value in a discrete sequence of
AnyRandomAccessIndex
values.
Requires: self
has a well-defined predecessor.
Declaration
func
predecessor
() -
>
AnyRandomAccessIndex
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
func
stride
(
through
end
:
AnyRandomAccessIndex
,
by
stride
:
AnyRandomAccessIndex
.
Stride
) -
>
StrideThrough
<
AnyRandomAccessIndex
>
Declared In
Strideable
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
func
stride
(
to
end
:
AnyRandomAccessIndex
,
by
stride
:
AnyRandomAccessIndex
.
Stride
) -
>
StrideTo
<
AnyRandomAccessIndex
>
Declared In
Strideable
Return the next consecutive value in a discrete sequence of
AnyRandomAccessIndex
values.
Requires: self
has a well-defined successor.
Declaration
func
successor
() -
>
AnyRandomAccessIndex
2 inherited items hidden. (Show all)
A wrapper over an underlying
RandomAccessIndexType
that hides the specific underlying type.See Also:
AnyRandomAccessCollection