protocol ForwardIndexType
Inheritance 
Equatable, _ForwardIndexType, _Incrementable
View Protocol Hierarchy →


Associated Types 
Distance : _SignedIntegerType = Int
A type that can represent the number of steps between pairs of
Reachability is defined by the ability to produce one value from
the other via zero or more applications of _DisabledRangeIndex = _DisabledRangeIndex_
A type that can represent the number of steps between pairs of
Reachability is defined by the ability to produce one value from
the other via zero or more applications of 
Import  import Swift 
Instance Methods
Return true if lhs
is equal to rhs
.
Equality implies substitutability. When x == y
, x
and
y
are interchangeable in any code that only depends on their
values.
Class instance identity as distinguished by tripleequals ===
is notably not part of an instance's value. Exposing other
nonvalue aspects of Equatable
types is discouraged, and any
that are exposed should be explicitly pointed out in
documentation.
Equality is an equivalence relation
x == x
istrue
x == y
impliesy == x
x == y
andy == z
impliesx == z
Inequality is the inverse of equality, i.e. !(x == y)
iff
x != y
Declaration
func ==(lhs: Self, rhs: Self) > Bool
Declared In
Equatable
Return the next consecutive value in a discrete sequence of
Self
values
Requires: self
has a welldefined successor.
Declaration
func successor() > Self
Declared In
_Incrementable
Represents a discrete value in a series, where a value's successor, if any, is reachable by applying the value's
successor()
method.