net.sf.anupam.csv.formatters
Class LastWordFormatter
java.lang.Object
net.sf.anupam.csv.formatters.LastWordFormatter
- All Implemented Interfaces:
- CSVFieldFormatter
final class LastWordFormatter
- extends Object
- implements CSVFieldFormatter
A formatter
that returns the last word
of the specified CSV value. This is useful in situations such as
extracting the last name.
- Since:
- 1.5
- Version:
- $Revision: 1.3 $
- Author:
- Anupam Sengupta
- See Also:
FirstWordFormatter
- CSV Formatter Mapping:
CSV Formatter Name: "lastWord" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LastWordFormatter
public LastWordFormatter()
- Constructor for FirstWordFormatter.
format
public String format(String value)
- Formats the value and returns the last word.
- Specified by:
format
in interface CSVFieldFormatter
- Parameters:
value
- the value to be transformed
- Returns:
- the last word from the input value
- See Also:
CSVFieldFormatter.format(String)
© Anupam Sengupta 2005