Here you can find the source of toArrayList(List
public static List<Integer> toArrayList(List<String> list)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List<Integer> toArrayList(List<String> list) { List<Integer> items = new ArrayList<Integer>(); if (list != null && list.size() > 0) { for (String item : list) { items.add(Integer.valueOf(item)); }// w w w . j a va 2 s . c o m } return items; } }