Enumerationswift 6.0.3Foundation
Unit
enum Unit
enum Unit
import Foundation
class MassFormatter
case gram
case kilogram
case ounce
case pound
case stone
override init()
required init?(coder: NSCoder)
var isForPersonMassUse: Bool
var numberFormatter: NumberFormatter!
var unitStyle: Formatter.UnitStyle
func string(fromKilograms numberInKilograms: Double) -> String
func string(fromValue value: Double, unit: MassFormatter.Unit) -> String
func unitString(fromKilograms numberInKilograms: Double, usedUnit unitp: UnsafeMutablePointer<MassFormatter.Unit>?) -> String
func unitString(fromValue value: Double, unit: MassFormatter.Unit) -> String
func unitStringDisplayedAdjacent(toValue value: Double, unit: MassFormatter.Unit) -> String
Return the locale-appropriate unit to be shown adjacent to the given value. In most cases this will match unitStringDisplayedAdjacent(toValue:, unit:)
however there are a few special cases: - Imperial pounds with a short representation use “lb” in the abstract and “#” only when shown with a numeral. - Stones are are singular in the abstract and only plural when shown with a numeral.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(rawValue: Int)
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)