AnyIndex

struct AnyIndex

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

See Also: AnyCollection

Inheritance Comparable, Equatable View Protocol Hierarchy →
Import import Swift

Initializers

init(_:)

Creates a new index wrapping base.

Declaration

init<BaseIndex : Comparable>(_ base: BaseIndex)

Instance Methods

func <(_:rhs:)

Returns a Boolean value indicating whether the first argument represents a position before the second argument.

The types of the two underlying indices must be identical.

Parameters: lhs: An index to compare. rhs: Another index to compare.

Declaration

func <(lhs: AnyIndex, rhs: AnyIndex) -> Bool
func ==(_:rhs:)

Returns a Boolean value indicating whether two indices wrap equal underlying indices.

The types of the two underlying indices must be identical.

Parameters: lhs: An index to compare. rhs: Another index to compare.

Declaration

func ==(lhs: AnyIndex, rhs: AnyIndex) -> Bool