Add and updated for whole the money modules with new style and some operators and computation

But money object not full implementation yet, because we need the exchange and filter the object states for money
This commit is contained in:
2021-02-08 12:39:52 +07:00
parent 19130727e3
commit 31760ee901
14 changed files with 240 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
package com.cubetiqs.money
fun StdMoney.exchangeTo(currency: String): StdMoney {
fun StdMoney.exchangeTo(currency: StdMoney.Currency): StdMoney {
return MoneyExchangeUtils.exchange(this, currency)
}
fun StdMoney.isMatchedCurrency(currency: String) = this.getMoneyCurrency().equals(currency, ignoreCase = true)
fun StdMoney.isMatchedCurrency(currency: StdMoney.Currency) = this.getMoneyCurrency().getCurrency().equals(currency.getCurrency(), ignoreCase = true)