BigMoney.
This interface provides an abstraction over Money and BigMoney.
In general, applications should use the concrete types, not this interface.
However, utilities and frameworks may choose to make use of this abstraction.
Implementations of BigMoneyProvider may be mutable.
To minimise the risk of the value of the provider changing while processing,
any method that takes a BigMoneyProvider as a parameter should convert
it to a BigMoney immediately and use that directly from then on.
The method BigMoney#of(BigMoneyProvider) performs the conversion
safely with null checks and is recommended for this purpose.
This interface makes no guarantees about the immutability or thread-safety of implementations.
| Modifier and Type | Method and Description |
|---|---|
| public BigMoney | Returns: the converted money instance, never nullReturns a |
| toBigMoney | back to summary |
|---|---|
| public BigMoney toBigMoney() Returns a
It is recommended that
| |