public interface MoneyPrinter
The printer may print any part, or the whole, of the input BigMoney.
Typically, a complete print is constructed from a number of smaller printers
that have been combined using MoneyFormatterBuilder.
This interface must be implemented with care to ensure other classes operate correctly. All instantiable implementations must be thread-safe, and should generally be final and immutable.
| Modifier and Type | Method | Description |
|---|---|---|
void |
print(MoneyPrintContext context,
java.lang.Appendable appendable,
BigMoney money) |
Prints part of a monetary value to the output appendable.
|
void print(MoneyPrintContext context, java.lang.Appendable appendable, BigMoney money) throws java.io.IOException
The implementation determines what to append, which may be some or all
of the data held in the BigMoney.
The context is not a thread-safe object and a new instance will be created for each print. The context must not be stored in an instance variable or shared with any other threads.
context - the context being used, not nullappendable - the appendable to add to, not nullmoney - the money to print, not nullMoneyFormatException - if there is a problem while printingjava.io.IOException - if an IO exception occursCopyright © 2009–2018 Joda.org. All rights reserved.