class ValueList extends ArrayList<String> {

    public static String toString(List<?> data, String separator) {
        StringBuilder buffer;
        Iterator<?>   values;

        buffer = new StringBuilder();
        values = data.iterator();

        // Deals with the first value separately.
        if(values.hasNext())
            buffer.append(values.next().toString());

        // All subsequent values will be concatenated after a separator.
        while(values.hasNext()) {
            buffer.append(separator);
            buffer.append(values.next().toString());
        }

        // Returns the final value.
        return buffer.toString();
    }

    public  ValueList(String data, String separator);

}