Package com.prowidesoftware.swift.model
Class Money
- java.lang.Object
-
- com.prowidesoftware.swift.model.Money
-
- All Implemented Interfaces:
java.io.Serializable
public final class Money extends java.lang.Object implements java.io.Serializable
A simple POJO to represent money, an amount associated with a currency.
This might someday be replaced by an implementation of https://javamoney.github.io/api.html- Since:
- 8.0.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Money(java.lang.String currency, java.lang.Number amount)
Money(java.lang.String currency, java.math.BigDecimal amount)
Money(java.util.Currency currency, java.lang.Number amount)
Money(java.util.Currency currency, java.math.BigDecimal amount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigDecimal
getAmount()
java.lang.String
getCurrency()
-
-
-
Constructor Detail
-
Money
public Money(java.util.Currency currency, java.math.BigDecimal amount)
- Parameters:
currency
- a not null currencyamount
- the value for the amount, may be null
-
Money
public Money(java.lang.String currency, java.math.BigDecimal amount)
- Parameters:
currency
- a not null currency codeamount
- the value for the amount, may be null
-
Money
public Money(java.util.Currency currency, java.lang.Number amount)
- Parameters:
currency
- a not null currencyamount
- the value for the amount, may be null
-
Money
public Money(java.lang.String currency, java.lang.Number amount)
- Parameters:
currency
- a not null currency codeamount
- the value for the amount, may be null
-
-