Here you can find the source of stringToList(String input)
public static List<String> stringToList(String input)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static List<String> stringToList(String input) { List<String> list = new ArrayList<String>(); for (String element : input.split("-")) { list.add(element);//from w ww . ja va 2 s . com } return list; } }