public static String toCommaDelimitedStringInQuotes(Collection c){
  StringBuffer result=new StringBuffer();
  for (Iterator i=c.iterator(); i.hasNext(); ) {
    Object o=i.next();
    result.append(",'" + o.toString() + "'");
  }
  return result.substring(1);
}

public static String toCommaDelimitedStringInQuotes ( Collection c ) { StringBuffer result = new StringBuffer ( ) ; for ( Iterator i = c . iterator ( ) ; i . hasNext ( ) ; ) { Object o = i . next ( ) ; result . append ( ",'" + o . toString ( ) + "'" ) ; } return result . substring ( 1 ) ; }
returns the elements of c separated by commas and enclosed in single - quotes
