Commodity
public class Commodity
extension Commodity: CustomStringConvertible
extension Commodity: Equatable
A commodity just consists of a symbol
-
symbol of the commodity
Declaration
Swift
public let symbol: CommoditySymbol -
opening of the commodity
Declaration
Swift
public let opening: Date? -
MetaData of the Commodity
Declaration
Swift
public let metaData: [String : String] -
Creates an commodity with the given symbol, and an optinal opening date
Declaration
Swift
public init(symbol: CommoditySymbol, opening: Date? = nil, metaData: [String : String] = [:])Parameters
symbolsymbol of the commodity
openingdate the commodity was opened
-
String of the commodity definition
If no opening is set it is an empty string
Declaration
Swift
public var description: String { get } -
Retuns if the two commodities are equal, meaning their
symbols and meta data are equalDeclaration
Swift
public static func == (lhs: Commodity, rhs: Commodity) -> BoolParameters
lhscommodity 1
rhscommodity 2
Return Value
true if the sybols and meta data are equal, false otherwise
View on GitHub
Install in Dash
Commodity Class Reference