Class CSVFormatterFactory

java.lang.Object
net.sf.anupam.csv.formatters.CSVFormatterFactory

public final class CSVFormatterFactory extends Object
A singleton factory which creates and caches the csv field formatters. The factory maintains a cache of CSV formatters that are reentrant (i.e., the formatters that do not maintain any instance specific state).
Since:
1.8
Version:
$Revision$
Author:
Anupam Sengupta
See Also:
  • Method Details

    • getSingleton

      public static CSVFormatterFactory getSingleton()
      Returns the singleton instance of this factory.
      Returns:
      the singleton instance
    • createFormatterFor

      public CSVFieldFormatter createFormatterFor(String formatterName) throws CSVOException
      Creates a new instance of the specified formatter. The cache is used whenever possible.
      Parameters:
      formatterName - the formatter to return
      Returns:
      the requested formatter
      Throws:
      CSVOException - thrown if the formatter cannot be created