Here you can find the source of stringToListLong(String input)
public static List<Long> stringToListLong(String input)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { private static final String COMMA = ","; public static List<Long> stringToListLong(String input) { List<Long> outList = new ArrayList<Long>(); if (null == input || input.trim().isEmpty()) { return outList; }//from w w w . java2 s .com String[] out = input.split(COMMA); for (String temp : out) { outList.add(Long.parseLong(temp)); } return outList; } }