mathiasverraes/money — Issue #7: deal with decimals using BigMoney
Author: mathiasverraes
Created: 2011-12-08 07:37:14+00:00
State: open

idea from http://joda-money.sourceforge.net/userguide.html

> There are two main classes which are both based on BigDecimal:
> Money - an amount in a single currency where the decimal places is determined by the currency
> BigMoney - an amount in a single currency where there is no restriction on the scale
>
> For example, the currencies of US dollars, Euros and British Pounds all use 2 decimal places, thus a Money instance for any of these currencies will have 2 decimal places. By contrast, the Japanese Yen has 0 decimal places, and thus any Money instance with that currency will have 0 decimal places.
>
> Instances of BigMoney may have any scale that can be supported by BigDecimal.
> Conversion between a Money and a BigMoney can be performed using the methods toBigMoney() and toMoney(). The latter optionally takes a rounding mode to handle the case where information must be lost.