Currency
@objcMembers
public final class Currency : NSObject
Currency structure.
-
Lowercased 3-letters currency ISO code.
Declaration
Swift
public let isoCode: String -
Pretty printed object description.
Declaration
Swift
public override var description: String { get }
-
Initializes currency with 3-lettered ISO code.
Throws
Invalid currency exception.Declaration
Swift
@objc(initWithISOCode:error:) public init(isoCode: String) throwsParameters
isoCodeISO code.
-
Initializes the currench with 3-lettered ISO code.
Warning
This method returnsnilif ISO code is not valid.Declaration
Swift
@objc(initWithISOCode:) public convenience init?(_ isoCode: String)Parameters
isoCode3-lettered ISO code.
-
Creates and returns an instance of
Currencywith the givenisoCode.Declaration
Swift
@objc(withISOCode:) public static func with(isoCode: String) -> Currency?Parameters
isoCodeThree-lettered currency ISO code.
Return Value
An instance of
Currencyornilif ISO code is invalid. -
Checks if 2 objects are equal.
Declaration
Swift
public static func == (lhs: Currency, rhs: Currency) -> BoolParameters
lhsFirst object.
rhsSecond object.
Return Value
trueif 2 objects are equal,falseotherwise. -
Checks if the receiver is equal to
object.Declaration
Swift
public override func isEqual(_ object: Any?) -> BoolParameters
objectObject to test equality with.
Return Value
trueif the receiver is equal toobject,falseotherwise.
-
Declaration
Swift
public static let allCases: [Currency]
-
Encodes the contents of the receiver.
Throws
EncodingErrorDeclaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderEncoder.
-
Declaration
Swift
public convenience init(from decoder: Decoder) throws
-
Creates a copy of the receiver.
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> AnyParameters
zoneZone.
Return Value
Copy of the receiver.
Currency Class Reference