UnorderedPair
public struct UnorderedPair<T> : SymmetricPair
extension UnorderedPair: CustomStringConvertible
extension UnorderedPair: Equatable where T: Equatable
extension UnorderedPair: Hashable where T: Hashable
extension UnorderedPair: Codable where T: Codable
Pair
of two values of the same type for which the order of the values is not meaningful.
-
The first value contained herein.
Declaration
Swift
public let a: T
-
The second value contained herein.
Declaration
Swift
public let b: T
-
Creates an
UnrderedPair
with the given values.Declaration
Swift
@inlinable public init(_ a: T, _ b: T)
-
Printable description of
UnorderedPair
.Declaration
Swift
public var description: String { get }
-
Declaration
Swift
@inlinable public func other(_ value: T) -> T?
Return Value
The value in this
UnorderedPair
other than the givenvalue
, if the givenvalue
is contained herein. Otherwise,nil
.
-
Declaration
Swift
@inlinable public static func == (lhs: UnorderedPair, rhs: UnorderedPair) -> Bool
Return Value
true
if both values contained by the givenUnorderedPair
values are equivalent, regardless of order. Otherwise,false
.
-
Implements hashable requirement.
Declaration
Swift
@inlinable public func hash(into hasher: inout Hasher)