|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MoneyPrinter
Prints part of a monetary value to the output appendable.
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.
Method Summary | |
---|---|
void |
print(MoneyPrintContext context,
Appendable appendable,
BigMoney money)
Prints part of a monetary value to the output appendable. |
Method Detail |
---|
void print(MoneyPrintContext context, Appendable appendable, BigMoney money) throws 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 null
MoneyFormatException
- if there is a problem while printing
IOException
- if an IO exception occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |