vint
04/02/2016, 2:47 PMenum class Currency(val sign: String) {
USD("$"),
GBP("£"),
THB("฿")
}
I can use it by
val currency = Currency.USD
println(currency.sign) // print '$'
But what if I want to have a custom enum, how to create something like Currency.customSign("*")