Deprecated
As of 3.6, use Apache Commons Text CompositeFormat.
| 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)Create 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: toAppendTothe object to format obj, final StringBuffer the toAppendTo, final FieldPosition StringBuffer to append tothe FieldPosition to use (or ignore). pos)Implements abstract java. Uses the formatter Format instance. |
| public Format | Returns: formatter Format implementationProvides access to the parser Format implementation. |
| public Format | Returns: parser Format implementationProvides access to the parser Format implementation. |
| public Object | Returns: the parsed Objectthe 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. Uses the parser Format instance. |
| 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) Create 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. Uses the formatter Format instance.
| |
| getFormatter | back to summary |
|---|---|
| public Format getFormatter() Provides access to the parser Format implementation.
| |
| getParser | back to summary |
|---|---|
| public Format getParser() Provides access to the parser Format implementation.
| |
| parseObject | back to summary |
|---|---|
| public Object parseObject(final String source, final ParsePosition pos) Implements abstract java. Uses the parser Format instance.
| |
| reformat | back to summary |
|---|---|
| public String reformat(final String input) throws ParseException Utility method to parse and then reformat a String.
| |