struct
ReversedRandomAccessIndex
<
Base
:
RandomAccessCollection
>
Inheritance |
Comparable, Equatable
View Protocol Hierarchy →
|
---|---|
Import |
|
Initializers
Declaration
init
(
_
base
:
Base
.
Index
)
Instance Variables
The position corresponding to self
in the underlying collection.
Declaration
var
base
:
Base
.
Index
{
get
}
Instance Methods
Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.
This function is the only requirement of the Comparable
protocol. The
remainder of the relational operator functions are implemented by the
standard library for any type that conforms to Comparable
.
Parameters: lhs: A value to compare. rhs: Another value to compare.
Declaration
func
<
(
lhs
:
ReversedRandomAccessIndex
<
Base
>
,
rhs
:
ReversedRandomAccessIndex
<
Base
>
) -
>
Bool
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values a
and b
,
a == b
implies that a != b
is false
.
Parameters: lhs: A value to compare. rhs: Another value to compare.
Declaration
func
==(
lhs
:
ReversedRandomAccessIndex
<
Base
>
,
rhs
:
ReversedRandomAccessIndex
<
Base
>
) -
>
Bool
An index that traverses the same positions as an underlying index, with inverted traversal direction.