package uk.ac.ebi.quickgo.common.converter;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * A useful class for converting stuff.
 *
 * @author Tony Wardell
 * Date: 28/07/2016
 * Time: 13:51
 * Created with IntelliJ IDEA.
 */
public class HelpfulConverter {

    /**
     * Turns "AAA", "BBB", "CCC" into "AAA,BBB,CCC".
     * @param values
     * @return
     */

    public static String toCSV(String... values) {
        return Arrays.stream(values).collect(Collectors.joining(","));
    }
}

@@ -84,25 +84,80 @@
 til.
-stream.Collectors
+List;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.Stream
 ;%0A%0A/
@@ -501,16 +501,22 @@
  return 
+toCSV(
 Arrays.s
@@ -528,16 +528,202 @@
 (values)
+);%0A    %7D%0A%0A    public static String toCSV(List%3CString%3E values) %7B%0A        return toCSV(values.stream());%0A    %7D%0A%0A    public static String toCSV(Stream%3CString%3E stream)%7B%0A        return stream
 .collect

Create and refactor over-loaded versions of to CSV