Class CompositeFormat

java.lang.Object
java.text.Format
org.apache.commons.text.CompositeFormat
All Implemented Interfaces:
Serializable, Cloneable

public class CompositeFormat extends Format
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.
Since:
1.0
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Required for serialization support.
      See Also:
    • parser

      private final Format parser
      The parser to use.
    • formatter

      private final Format formatter
      The formatter to use.
  • Constructor Details

    • CompositeFormat

      public CompositeFormat(Format parser, Format formatter)
      Constructs a format that points its parseObject method to one implementation and its format method to another.
      Parameters:
      parser - implementation
      formatter - implementation
  • Method Details