org.nuiton.util
Class StringUtil.ToCSV<O>

java.lang.Object
  extended by org.nuiton.util.StringUtil.ToCSV<O>
Type Parameters:
O - type of object manipulated
All Implemented Interfaces:
StringUtil.ToString<O>
Enclosing class:
StringUtil

public static class StringUtil.ToCSV<O>
extends Object
implements StringUtil.ToString<O>

Used to build csv file using StringUtil.join(Iterable , ToString, String, boolean) method. This will provide a toString method to convert an object in a string and escape csv values if needed.


Field Summary
protected  String csvSeparator
           
 
Constructor Summary
StringUtil.ToCSV(String csvSeparator)
           
 
Method Summary
 String getStringValue(O o)
          Use Object.toString() method by default Must be @Override to use other methods to get string value.
 String toString(O o)
          Convert an object o in a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

csvSeparator

protected String csvSeparator
Constructor Detail

StringUtil.ToCSV

public StringUtil.ToCSV(String csvSeparator)
Method Detail

toString

public String toString(O o)
Description copied from interface: StringUtil.ToString
Convert an object o in a string.

Specified by:
toString in interface StringUtil.ToString<O>
Parameters:
o - to convert
Returns:
the string for this object o

getStringValue

public String getStringValue(O o)
Use Object.toString() method by default Must be @Override to use other methods to get string value.

Parameters:
o - to convert
Returns:
String value


Copyright © 2004-2011 CodeLutin. All Rights Reserved.