com.bea.commerce.ebusiness.price.quote
Class ImmutableMoney
java.lang.Object
com.bea.commerce.ebusiness.price.quote.AbstractMoney
com.bea.commerce.ebusiness.price.quote.ImmutableMoney
- All Implemented Interfaces
- Money, Serializable, Cloneable
public class ImmutableMoney
- extends AbstractMoney
- implements Cloneable
- See Also
- Serialized Form
Constructor Summary |
ImmutableMoney(double value,
String currency)
Constructs a new ImmutableMoney object with a
value and currency as specified by the given
parameters. |
ImmutableMoney
public ImmutableMoney(double value,
String currency)
- Constructs a new ImmutableMoney object with a
value and currency as specified by the given
parameters.
- Parameters
value
- the amount of moneycurrency
- the string value of the currency
create
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
- See Also
Money
create
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 objectvalue
- the amount of the new money object
- Returns
- a new ImmutableMoney object
- See Also
Money
create
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
- See Also
Money
getValue
public double getValue()
- Specified by:
getValue
in interface Money
- Specified by:
getValue
in class AbstractMoney
- Returns
- the amount of money.
getCurrency
public String getCurrency()
- Specified by:
getCurrency
in interface Money
- Specified by:
getCurrency
in class AbstractMoney
- Returns
- the currency string.
toString
public String toString()
- Returns the class of the object and the value and
currency of the object.
- Overrides:
toString
in class AbstractMoney
- Returns
- the value and currency of the object as a String
Copyright © 2006 BEA Systems, Inc. All Rights Reserved