| java.lang.Object java.text.Format org.apache.commons.lang.text.CompositeFormat
CompositeFormat | public class CompositeFormat extends Format (Code) | | Formats using one formatter and parses using a different formatter.
An example of use for this would be a webapp where data is taken in one way
and stored in a database another way.
author: Archimedes Trajano version: $Id: $ |
Constructor Summary | |
public | CompositeFormat(Format parser, Format formatter) Create a format that points its parseObject method to one implementation
and its format method to another. |
CompositeFormat | public CompositeFormat(Format parser, Format formatter)(Code) | | Create a format that points its parseObject method to one implementation
and its format method to another.
Parameters: parser - implementation Parameters: formatter - implementation |
getFormatter | public Format getFormatter()(Code) | | Provides access to the parser Format implementation.
formatter Format implementation |
getParser | public Format getParser()(Code) | | Provides access to the parser Format implementation.
parser Format implementation |
reformat | public String reformat(String input) throws ParseException(Code) | | Utility method to parse and then reformat a String.
Parameters: input - String to reformat A reformatted String throws: ParseException - thrown by parseObject(String) call |
|
|