ImmutableMoney Class
- public class ImmutableMoney
extends AbstractMoney
implements Cloneable
-
Hierarchy
-
Object
AbstractMoney
ImmutableMoney
-
All Implemented Interfaces
-
Cloneable
, Money
, Serializable
-
ImmutableMoney(double value,
String currency)
- Constructs a new ImmutableMoney object with a
value and currency as specified by the given
parameters.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImmutableMoney
public ImmutableMoney(double value,
String
currency)
- Constructs a new ImmutableMoney object with a
value and currency as specified by the given
parameters.
create(Money) Method
public static ImmutableMoney
create(Money
axiomMoney)
Create a new immutable money object from the
com.beasys.commerce.axiom.units.Money object
passed in.
Parameters
-
axiomMoney
- a money object
Returns
- a new ImmutableMoney object
Related Topics
Money
create(Money, double) Method
public static ImmutableMoney
create(Money
money,
double value)
Create a new immutable money object.
The currency is obtained from the money object
specified and the value of the new object will
match the value specified.
Parameters
-
money
- a money object
-
value
- the amount of the new money object
Returns
- a new ImmutableMoney object
Related Topics
Money
create(Money) Method
public static ImmutableMoney
create(Money
money)
Create a new immutable money object.
The values for the new object will be obtained
from the specified money object.
Parameters
-
money
- a money object
Returns
- a new ImmutableMoney object
Related Topics
Money
getCurrency() Method
public String
getCurrency()
-
Overrides
-
AbstractMoney.getCurrency()
Returns
- the currency string.
getValue() Method
public double getValue()
-
Overrides
-
AbstractMoney.getValue()
Returns
- the amount of money.
toString() Method
public String
toString()
Returns the class of the object and the value and
currency of the object.
-
Overrides
-
AbstractMoney.toString()
Returns
- the value and currency of the object as a String