ImmutableMoney Class

com.bea.commerce.ebusiness.price.quote
ImmutableMoney Class

public class ImmutableMoney

    extends AbstractMoney
    implements Cloneable

Hierarchy
Object
  AbstractMoney
    ImmutableMoney
All Implemented Interfaces

Cloneable, Money, Serializable

Field Summary

   
Fields from  com.bea.commerce.ebusiness.price.quote.AbstractMoney
NO_CURRENCY, ZERO
 

Constructor Summary

ImmutableMoney(double value, String currency)

Constructs a new ImmutableMoney object with a value and currency as specified by the given parameters.
 

Method Summary

public static ImmutableMoney
create(Money axiomMoney)
Create a new immutable money object from the com.beasys.commerce.axiom.units.Money object passed in.
public static ImmutableMoney
create(Money money, double value)
Create a new immutable money object.
public static ImmutableMoney
create(Money money)
Create a new immutable money object.
public String
getCurrency()
public double
getValue()
public String
toString()
Returns the class of the object and the value and currency of the object.
 
Methods from  com.bea.commerce.ebusiness.price.quote.AbstractMoney
compare, equals,
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.commerce.ebusiness.price.quote.Money
getCurrency, getValue
 

Constructor Detail

ImmutableMoney

public ImmutableMoney(double value, 
                      String currency)
Constructs a new ImmutableMoney object with a value and currency as specified by the given parameters.
 

Method Detail

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