Package net.sf.anupam.csv.formatters
Class CSVFormatterFactory
java.lang.Object
net.sf.anupam.csv.formatters.CSVFormatterFactory
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 Summary
Modifier and TypeMethodDescriptioncreateFormatterFor(String formatterName) Creates a new instance of the specified formatter.static CSVFormatterFactoryReturns the singleton instance of this factory.
-
Method Details
-
getSingleton
Returns the singleton instance of this factory.- Returns:
- the singleton instance
-
createFormatterFor
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
-