Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.commerce.ebusiness.price.quote
Class MutableMoney

    java.lang.Object
      com.bea.commerce.ebusiness.price.quote.AbstractMoney
          com.bea.commerce.ebusiness.price.quote.MutableMoney

All Implemented Interfaces
  Money, Serializable, Cloneable

Deprecated See BEA Commerce product offering

    @Deprecated
    public class MutableMoney

extends AbstractMoney
implements Cloneable

A money object that may have it's amount and currency modified.

See Also
  Serialized Form

Field Summary

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

Constructor Summary
`MutableMoney()` Deprecated See BEA Commerce product offering
`MutableMoney(double value, String currency)` Deprecated See BEA Commerce product offering

Method Summary
`MutableMoney` | `add(double value)` Deprecated See BEA Commerce product offering
`MutableMoney` | `add(Money value)` Deprecated See BEA Commerce product offering
`static MutableMoney` | `copyFromAxiomMoney(Money from, MutableMoney to)` Deprecated See BEA Commerce product offering
`static MutableMoney` | `create(Money axiomMoney)` Deprecated See BEA Commerce product offering
`static MutableMoney` | `create(Money money)` Deprecated See BEA Commerce product offering
`static MutableMoney` | `create(Money money, double value)` Deprecated See BEA Commerce product offering
`String` | `getCurrency()` Deprecated See BEA Commerce product offering
`double` | `getValue()` Deprecated See BEA Commerce product offering
`MutableMoney` | `set(double value, String currency)` Deprecated See BEA Commerce product offering
`MutableMoney` | `set(Money money)` Deprecated See BEA Commerce product offering
`MutableMoney` | `set(Money money, double value)` Deprecated See BEA Commerce product offering
`void` | `setCurrency(String currency)` Deprecated See BEA Commerce product offering
`void` | `setValue(double value)` Deprecated See BEA Commerce product offering
`String` | `toString()` Deprecated See BEA Commerce product offering

Methods inherited from class com.bea.commerce.ebusiness.price.quote.AbstractMoney
`compare, equals`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MutableMoney

    public MutableMoney()

  Deprecated See BEA Commerce product offering

  Constructs a new MutableMoney object with a value of zero and a currency of "NoCurrency".

  See Also
    `AbstractMoney`

### MutableMoney

    public MutableMoney(double value,
                        String currency)

  Deprecated See BEA Commerce product offering

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

  Parameters
    `value` - the amount of money
    `currency` - the string value of the currency

Method Detail

### create

    public static MutableMoney create(Money axiomMoney)

  Deprecated See BEA Commerce product offering

  Create a new money object from the com.beasys.commerce.axiom.units.Money object passed in.

  Parameters
    `axiomMoney` - a money object
  Returns
    a new MutableMoney object
  See Also
    `Money`

### create

    public static MutableMoney create(Money money,
                                      double value)

  Deprecated See BEA Commerce product offering

  Create a new 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 MutableMoney object
  See Also
    `Money`

### create

    public static MutableMoney create(Money money)

  Deprecated See BEA Commerce product offering

  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 MutableMoney object
  See Also
    `Money`

### copyFromAxiomMoney

    public static MutableMoney copyFromAxiomMoney(Money from,
                                                  MutableMoney to)

  Deprecated See BEA Commerce product offering

  Copies the values from the first parameter to the second parameter and returns the second parameter.

  Parameters
    `from` - a com.beasys.commerce.axiom.units.Money object to copy the values from
    `to` - a Money object to copy the from values to
  Returns
    new the to object with the new values
  Throws
    `NullPointerException`
  See Also
    `Money`

### set

    public MutableMoney set(double value,
                            String currency)

  Deprecated See BEA Commerce product offering

  Sets the value and currency of the object specified by the given parameters.

  Parameters
    `value` - the amount of money
    `currency` - the string value of the currency

### set

    public MutableMoney set(Money money,
                            double value)

  Deprecated See BEA Commerce product offering

  Sets the value and currency of the object specified by the given parameters.

  Parameters
    `value` - the amount of money
    `currency` - the string value of the currency

### set

    public MutableMoney set(Money money)

  Deprecated See BEA Commerce product offering

  Sets this object based on the values of the specified Money object.

  Parameters
    `money` - a money object
  Returns
    void
  See Also
    `Money`

### getValue

    public double getValue()

  Deprecated See BEA Commerce product offering

  Specified by:
    `getValue` in interface `Money`
  Specified by:
    `getValue` in class `AbstractMoney`
  Returns
    the amount of money

### getCurrency

    public String getCurrency()

  Deprecated See BEA Commerce product offering

  Specified by:
    `getCurrency` in interface `Money`
  Specified by:
    `getCurrency` in class `AbstractMoney`
  Returns
    the currency string.

### setValue

    public void setValue(double value)

  Deprecated See BEA Commerce product offering

  Set the amount for this money object

  Parameters
    `value` - amount of money

### setCurrency

    public void setCurrency(String currency)

  Deprecated See BEA Commerce product offering

  Set the currency for this money object

  Parameters
    `currency` - currency to be added

### add

    public MutableMoney add(double value)

  Deprecated See BEA Commerce product offering

  Adds the specified value to this money object.

  Parameters
    `value` - the amount of money to add to this object
  Returns
    this money object

### add

    public MutableMoney add(Money value)
                     throws CurrencyMismatchException

  Deprecated See BEA Commerce product offering

  Adds the specified Money object to this money object if the two objects have the same currency. If the currencies differ a CurrencyMismatchException will be thrown.

  Parameters
    `value` - the amount of money to add to this object
  Returns
    this money object
  Throws
    `CurrencyMismatchException`

### toString

    public String toString()

  Deprecated See BEA Commerce product offering

  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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved