zero
Creates a Money based on this Currency with its amount set to zero. Example:
val usd = Currency.of("USD")
usd.zero() // USD 0.00
Content copied to clipboard
Calculations using it are rounded using a Rounding strategy configured with RoundingMode.HALF_EVEN.
Receiver
Return
A Money with the monetary amount set to zero.
Creates a Money based on this Currency with its amount set to zero. Calculations using it are rounded using a Rounding strategy configured with the specified mode.
Receiver
Return
A Money with the monetary amount set to zero.
Parameters
mode
The rounding mode to configure the Rounding strategy.
Creates a Money based on this instance but with the monetary amount set to zero. Example:
val money = "USD 1.50".money()
money.zero() // USD 0.00
Content copied to clipboard
Receiver
Return
A Money with the monetary amount set to zero.