Here you can find the source of stringToList(String str)
public static ArrayList<Double> stringToList(String str)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; public class Main { public static ArrayList<Double> stringToList(String str) { str = str.substring(1, str.length() - 1); String[] sline = str.split(","); ArrayList<Double> list = new ArrayList<>(); for (String s : sline) { list.add(Double.parseDouble(s)); }//from w w w.j a v a 2s .c o m return list; } }