Package org.apache.commons.lang3.text
Class CompositeFormat
java.lang.Object
java.text.Format
org.apache.commons.lang3.text.CompositeFormat
- All Implemented Interfaces:
- Serializable,- Cloneable
Deprecated.
As of 3.6, use Apache Commons Text
 
 CompositeFormat instead
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.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.text.FormatFormat.Field
- 
Constructor SummaryConstructorsConstructorDescriptionCompositeFormat(Format parser, Format formatter) Deprecated.Create a format that points its parseObject method to one implementation and its format method to another.
- 
Method SummaryModifier and TypeMethodDescriptionformat(Object obj, StringBuffer toAppendTo, FieldPosition pos) Deprecated.Uses the formatter Format instance.Deprecated.Provides access to the parser Format implementation.Deprecated.Provides access to the parser Format implementation.parseObject(String source, ParsePosition pos) Deprecated.Uses the parser Format instance.Deprecated.Utility method to parse and then reformat a String.Methods inherited from class java.text.Formatclone, format, formatToCharacterIterator, parseObject
- 
Constructor Details- 
CompositeFormatDeprecated.Create a format that points its parseObject method to one implementation and its format method to another.- Parameters:
- parser- implementation
- formatter- implementation
 
 
- 
- 
Method Details- 
formatDeprecated.Uses the formatter Format instance.- Specified by:
- formatin class- Format
- Parameters:
- obj- the object to format
- toAppendTo- the- StringBufferto append to
- pos- the FieldPosition to use (or ignore).
- Returns:
- toAppendTo
- See Also:
 
- 
getFormatterDeprecated.Provides access to the parser Format implementation.- Returns:
- formatter Format implementation
 
- 
getParserDeprecated.Provides access to the parser Format implementation.- Returns:
- parser Format implementation
 
- 
parseObjectDeprecated.Uses the parser Format instance.- Specified by:
- parseObjectin class- Format
- Parameters:
- source- the String source
- pos- the ParsePosition containing the position to parse from, will be updated according to parsing success (index) or failure (error index)
- Returns:
- the parsed Object
- See Also:
 
- 
reformatDeprecated.Utility method to parse and then reformat a String.- Parameters:
- input- String to reformat
- Returns:
- A reformatted String
- Throws:
- ParseException- thrown by parseObject(String) call
 
 
-