Here you can find the source of stringToList(String value)
public static List stringToList(String value) throws Exception
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List stringToList(String value) throws Exception { if (value == null || value.length() == 0) throw new Exception(); if (value.startsWith("[")) value = value.substring(1);/* ww w . j ava 2 s. c om*/ if (value.endsWith("]")) value = value.substring(0, value.length() - 1); String[] elements = value.split(","); List<String> list = new ArrayList(); for (int index = 0; index < elements.length; index++) { list.add(elements[index]); } return list; } }