This class is immutable and thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Serialization version. |
| private final MoneyAmountStyle | style
The style to use. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private 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 |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version. | |
| style | back to summary |
|---|---|
| private final MoneyAmountStyle style The style to use. | |
| AmountPrinterParser | back to summary |
|---|---|
| pack-priv AmountPrinterParser(MoneyAmountStyle style) Constructor.
| |
| isPostGroupingPoint | back to summary |
|---|---|
| private boolean isPostGroupingPoint(int i, int post, int groupingSize, int extendedGroupingSize) | |
| isPreGroupingPoint | back to summary |
|---|---|
| private boolean isPreGroupingPoint(int remaining, int groupingSize, int extendedGroupingSize) | |
| 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- | |