This class is immutable and thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private final MoneyParser[] | parsers
The parsers. |
| private final MoneyPrinter[] | printers
The printers. |
| private static final long | serialVersionUID
Serialization version. |
| Access | Constructor and Description |
|---|---|
| pack-priv | MultiPrinterParser(MoneyPrinter[]
the printers, not null printers, MoneyParser[] parsers)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv boolean | |
| pack-priv boolean | |
| public void | parse(MoneyParseContext
the context to use and parse into, not null context)Implements org. Parses monetary information using a textual representation. |
| public void | print(MoneyPrintContext
the context being used, not null context, Appendable the appendable to add to, not null appendable, BigMoney the money to print, not null money)Implements org. Prints part of a monetary value to the output appendable. |
| public String |
| parsers | back to summary |
|---|---|
| private final MoneyParser[] parsers The parsers. | |
| printers | back to summary |
|---|---|
| private final MoneyPrinter[] printers The printers. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version. | |
| MultiPrinterParser | back to summary |
|---|---|
| pack-priv MultiPrinterParser(MoneyPrinter[] printers, MoneyParser[] parsers) Constructor.
| |
| appendTo | back to summary |
|---|---|
| pack-priv void appendTo(MoneyFormatterBuilder builder) | |
| isParser | back to summary |
|---|---|
| pack-priv boolean isParser() | |
| isPrinter | back to summary |
|---|---|
| pack-priv boolean isPrinter() | |
| parse | back to summary |
|---|---|
| public void parse(MoneyParseContext context) Implements org. Doc from org. Parses monetary information using a textual representation. The text and parse index are stored in the context. The parsed data and updated index is also stored in the context. Implementations should avoid throwing exceptions and use the error index in the context instead to record the problem. The context can be assumed to not be in error on entry to this method. The context is not a thread-safe object and a new instance will be created for each parse. The context must not be stored in an instance variable or shared with any other threads.
| |
| back to summary | |
|---|---|
| public void print(MoneyPrintContext context, Appendable appendable, BigMoney money) throws IOException Implements org. Doc from org. Prints part of a monetary value to the output appendable.
The implementation determines what to append, which may be some or all
of the data held in the 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |