mirror of
https://github.com/corda/corda.git
synced 2025-02-20 17:33:15 +00:00
Add Commodity class
This commit is contained in:
parent
44dee97899
commit
f72e223f3b
@ -420,3 +420,16 @@ enum class NetType {
|
||||
*/
|
||||
PAYMENT
|
||||
}
|
||||
|
||||
data class Commodity(val symbol: String,
|
||||
val displayName: String,
|
||||
val commodityCode: String = symbol,
|
||||
val defaultFractionDigits: Int = 0) {
|
||||
companion object {
|
||||
private val registry = mapOf<String, Commodity>(
|
||||
Pair("FCOJ", Commodity("FCOJ", "Frozen concentrated orange juice"))
|
||||
)
|
||||
fun getInstance(symbol: String): Commodity?
|
||||
= registry[symbol]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user