| Modifier and Type | Field and Description |
|---|---|
| private final Format | formatter
The formatter to use. |
| private final Format | parser
The parser to use. |
| private static final long | serialVersionUID
Required for serialization support.
|
| Access | Constructor and Description |
|---|---|
| public | CompositeFormat(final Format
implementation. parser, final Format implementation. formatter)Constructs a format that points its parseObject method to one implementation and its format method to another. |
| Modifier and Type | Method and Description |
|---|---|
| public StringBuffer | Returns: toAppendTo.the object to format. obj, final StringBuffer the toAppendTo, final FieldPosition StringBuffer to append to.the FieldPosition to use (or ignore). pos)Implements abstract java. Formats the input. |
| public Format | |
| public Format | |
| public Object | Returns: The parsed Object.the String source. source, final ParsePosition the ParsePosition containing the position to parse from, will be updated according to parsing success (index) or failure (error index). pos)Implements abstract java. Parses the input. |
| public String |
| formatter | back to summary |
|---|---|
| private final Format formatter The formatter to use. | |
| parser | back to summary |
|---|---|
| private final Format parser The parser to use. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Required for serialization support.
| |
| CompositeFormat | back to summary |
|---|---|
| public CompositeFormat(final Format parser, final Format formatter) Constructs a format that points its parseObject method to one implementation and its format method to another. | |
| format | back to summary |
|---|---|
| public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) Implements abstract java. Formats the input.
| |
| getFormatter | back to summary |
|---|---|
| public Format getFormatter() Gets the parser Format implementation.
| |
| getParser | back to summary |
|---|---|
| public Format getParser() Gets the parser Format implementation.
| |
| parseObject | back to summary |
|---|---|
| public Object parseObject(final String source, final ParsePosition pos) Implements abstract java. Parses the input.
| |
| reformat | back to summary |
|---|---|
| public String reformat(final String input) throws ParseException Parses and then reformats a String.
| |