org.apache.commons.lang.text
public class CompositeFormat extends Format
Version: $Id: $
Constructor Summary | |
---|---|
CompositeFormat(Format parser, Format formatter)
Create a format that points its parseObject method to one implementation
and its format method to another.
|
Method Summary | |
---|---|
StringBuffer | format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
Uses the formatter Format instance.
|
Format | getFormatter()
Provides access to the parser Format implementation.
|
Format | getParser()
Provides access to the parser Format implementation.
|
Object | parseObject(String source, ParsePosition pos)
Uses the parser Format instance.
|
String | reformat(String input)
Utility method to parse and then reformat a String.
|
Parameters: parser implementation formatter implementation
See Also: Format#format(Object, StringBuffer, FieldPosition)
Returns: formatter Format implementation
Returns: parser Format implementation
See Also: Format#parseObject(String, ParsePosition)
Parameters: input String to reformat
Returns: A reformatted String
Throws: ParseException thrown by parseObject(String) call