net.sf.anupam.csv.formatters
Class TrimWordFormatter
java.lang.Object
net.sf.anupam.csv.formatters.TrimWordFormatter
- All Implemented Interfaces:
- CSVFieldFormatter
final class TrimWordFormatter
- extends Object
- implements CSVFieldFormatter
A formatter
that returns the trimmed
CSV value. This is useful in situations when the CSV field is
known to have leading or trailing white-space.
- Since:
- 1.5
- Version:
- $Revision: 1.3 $
- Author:
- Anupam Sengupta
- CSV Formatter Mapping:
CSV Formatter Name: "trimWord" |
Method Summary |
String |
format(String value)
Formats the specified value and returns a trimmed representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrimWordFormatter
public TrimWordFormatter()
- Constructor for FirstWordFormatter.
format
public String format(String value)
- Formats the specified value and returns a trimmed representation. All leading and
trailing white space is trimmed.
- Specified by:
format
in interface CSVFieldFormatter
- Parameters:
value
- the value to be trimmed
- Returns:
- the trimmed value
- See Also:
CSVFieldFormatter.format(String)
© Anupam Sengupta 2005