public class Money extends DAbstractEvolvable implements Unit<Money>
Modifier and Type | Class and Description |
---|---|
class |
Money.Initializer |
Unit.UnitMisMatchException
MATH_CONTEXT
Constructor and Description |
---|
Money()
Default constructor required for evolution
|
Money(java.util.Currency cur)
Constructor
|
Modifier and Type | Method and Description |
---|---|
UnitValue<Money> |
convert(UnitValue<Money> otherValue)
Returns an instance of the UnitValue with this Unit converted according to a specific ratio
|
DEvolvable |
createInstance() |
boolean |
equals(java.lang.Object o) |
java.util.Currency |
getCurrency()
Returns the Currency
|
long |
getRatio(Money d)
Deprecated.
|
void |
giveInitializerTo(DEvolvableHelper evolvableHelper) |
int |
hashCode() |
static UnitValue<Money> |
money(long count,
java.lang.String symbol)
Creates an instance of Money of type Currency with the passed symbol.
|
java.lang.String |
toString() |
UnitValue<Money> |
valueOf(java.math.BigDecimal b)
Returns an instance of the UnitValue with this Unit and provided quantity
|
public Money()
public Money(java.util.Currency cur)
cur
- Currencypublic DEvolvable createInstance()
public void giveInitializerTo(DEvolvableHelper evolvableHelper)
public java.util.Currency getCurrency()
@Deprecated public long getRatio(Money d)
Unit
getRatio
in interface Unit<Money>
d
- Moneypublic UnitValue<Money> valueOf(java.math.BigDecimal b)
public UnitValue<Money> convert(UnitValue<Money> otherValue)
public static UnitValue<Money> money(long count, java.lang.String symbol)
count
- The amount of Moneysymbol
- The Currency currency code like USD.public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()