RangeProtocol
public protocol RangeProtocol
Unifying interface for Range
and ClosedRange
types.
-
Undocumented
Declaration
Swift
associatedtype Bound : Comparable
-
Undocumented
Declaration
Swift
var lowerBound: Bound { get }
-
Undocumented
Declaration
Swift
var upperBound: Bound { get }
-
relation(with:
Extension method) Declaration
Swift
public func relation(with range: Self) -> IntervalRelation
Return Value
The
IntervalRelation
between thisRangeProtocol
-conforming type and another.
-
shifted(by:
Extension method) Declaration
Swift
public func shifted(by amount: Bound) -> Self
Return Value
A new range equal to this range with bounds shifted by the given amount.