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

public abstract class AbstractMoney
extends `Object`
implements `Money`

Hierarchy
  `Object`
  `AbstractMoney`

All Implemented Interfaces
  `Money`, `Serializable`

Direct Known Subclasses
  `ImmutableMoney`, `MutableMoney`

## Field Summary

`public static final `String`` | `NO_CURRENCY` String
`public static final double` | `ZERO` double

## Constructor Summary

AbstractMoney()

## Method Summary

`public static int` | `compare`(`Money` moneyA, `Money` moneyB) Compares to money objects.
`public boolean` | `equals`(`Object` object) Compares the specified object with this object.
`public abstract `String`` | `getCurrency`()
`public abstract double` | `getValue`()
`public `String`` | `toString`() Returns a string containing the value and currency of the object.

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

Methods from interface `com.bea.commerce.ebusiness.price.quote.`Money``
``getCurrency`, `getValue``

## Field Detail

### NO_CURRENCY

    public static final String NO_CURRENCY

### ZERO

    public static final double ZERO

## Constructor Detail

### AbstractMoney

    public AbstractMoney()

## Method Detail

### compare(Money, Money) Method

    public static int compare(Money moneyA,
                              Money moneyB)
         throws CurrencyMismatchException

Compares to money objects.

#### Parameters

moneyA
  a Money object

moneyB
  a Money object

#### Returns

-1, 0, or 1 corresponding to the contract for the Comparator interface.

#### Exceptions

``CurrencyMismatchException``
  if the currencies of the two Money objects differ.

Related Topics

``Money``
``CurrencyMismatchException``

### equals(Object) Method

    public boolean equals(Object object)

Compares the specified object with this object. This method will return true if the specified object implements the Money interface and has the same currency and amount as this object.

Overrides
  `Object.equals(Object)`

#### Returns

true if the specified object implements the Money interface and has the same currency as this object.

Related Topics

``Money``

### getCurrency() Method

    public abstract String getCurrency()

#### Returns

the currency string.

### getValue() Method

    public abstract double getValue()

#### Returns

the amount of money

### toString() Method

    public String toString()

Returns a string containing the value and currency of the object.

Overrides
  `Object.toString()`

#### Returns

the value and currency of the object as a String