EnergyFormatter
class EnergyFormatterclass EnergyFormatterimport Foundationclass Formatterprotocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol NSCodingThe NSCoding protocol declares the two methods that a class must implement so that instances of that class can be encoded and decoded. This capability provides the basis for archiving (where objects and other structures are stored on disk) and distribution (where objects are copied to different address spaces).
protocol NSCopyingThe NSCopying protocol declares a method for providing functional copies of an object. The exact meaning of “copy” can vary from class to class, but a copy must be a functionally independent object with values identical to the original at the time the copy was made.
protocol NSObjectProtocol : AnyObjectThe NSObjectProtocol groups methods that are fundamental to all Foundation objects.
override init() required init?(coder: NSCoder) var isForFoodEnergyUse: Boolvar numberFormatter: NumberFormatter!var unitStyle: Formatter.UnitStylefunc string(fromJoules numberInJoules: Double) -> String func string(fromValue value: Double, unit: EnergyFormatter.Unit) -> String func unitString(fromJoules numberInJoules: Double, usedUnit unitp: UnsafeMutablePointer<EnergyFormatter.Unit>?) -> String func unitString(fromValue value: Double, unit: EnergyFormatter.Unit) -> String enum Unit