CSVObjects Framework

net.sf.anupam.csv.formatters
Class LastWordFormatter

java.lang.Object
  extended by 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"

Constructor Summary
LastWordFormatter()
          Constructor for FirstWordFormatter.
 
Method Summary
 String format(String value)
          Formats the value and returns the last word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LastWordFormatter

public LastWordFormatter()
Constructor for FirstWordFormatter.

Method Detail

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)

SourceForge.net Logo

© Anupam Sengupta 2005