public class Amount extends java.lang.Object
A number of monetary units specified in a currency where the unit of the currency is explicit or implied.
| Constructor and Description |
|---|
Amount()
|
Amount(java.math.BigDecimal value,
com.neovisionaries.i18n.CurrencyCode currency)
|
Amount(long value,
com.neovisionaries.i18n.CurrencyCode currency)
|
Amount(java.lang.String value,
com.neovisionaries.i18n.CurrencyCode currency)
|
| Modifier and Type | Method and Description |
|---|---|
com.neovisionaries.i18n.CurrencyCode |
getCurrency()
|
java.math.BigDecimal |
getValue()
|
Amount |
setCurrency(com.neovisionaries.i18n.CurrencyCode currency)
|
Amount |
setValue(java.math.BigDecimal value)
|
public Amount()
Instantiates a new amount.
public Amount(java.math.BigDecimal value, com.neovisionaries.i18n.CurrencyCode currency)
Instantiates a new amount.
value - the valuecurrency - the currency codepublic Amount(long value, com.neovisionaries.i18n.CurrencyCode currency)
Instantiates a new amount.
value - the valuecurrency - the currency codepublic Amount(java.lang.String value, com.neovisionaries.i18n.CurrencyCode currency)
Instantiates a new amount.
value - the valuecurrency - the currency codepublic com.neovisionaries.i18n.CurrencyCode getCurrency()
Gets the currency code.
ISO 4217 3A currency codepublic java.math.BigDecimal getValue()
Gets the amount value.
public Amount setCurrency(com.neovisionaries.i18n.CurrencyCode currency)
Sets the currency code.
currency - the new ISO 4217 3A currency codeCopyright © 2014 konik.io. All Rights Reserved.