Protocolswift 6.0.1Swift
UnsignedInteger
An integer type that can represent only nonnegative values.
protocol UnsignedInteger : BinaryInteger
Supertypes
protocol AdditiveArithmetic
A type with values that support addition and subtraction.
protocol BinaryInteger
An integer type with a binary representation.
protocol Comparable
A type that can be compared using the relational operators
<
,<=
,>=
, and>
.protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol ExpressibleByIntegerLiteral
A type that can be initialized with an integer literal.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Numeric
A type with values that support multiplication.
protocol Strideable<Stride>
A type representing continuous, one-dimensional values that can be offset and measured.
Citizens in Swift
Type members
static var isSigned: Bool
A Boolean value indicating whether this type is a signed integer type.
Instance members
var magnitude: Self
The magnitude of this value.
Citizens in Swift
where Self:FixedWidthInteger
Type members
init<T>(T
) Creates a new instance from the given integer.
init?<T>(exactly: T
) Creates a new instance from the given integer, if it can be represented exactly.
static var max: Self
The maximum representable integer in this type.
static var min: Self
The minimum representable integer in this type.